MATLAB: Hello, I am new to Matlab, and I am trying to plot a graph between values of phase shift beta and root mean square value. When i run this code, I get only one value of K, whereas in order to plot the graph, I should have multiple values of K. Help!

phase_shift

for beta = -20000:200:200000
tauPS = beta/(2*pi*fc);
md = delay(t,m,tau); % Time delay according to the channel
md = md/max(abs(m)); % Normalize the amplitude to 1

yD = yD/max(abs(yD)); % Normalize the amplitude to 1
K1 = rmse(md,c);
K2 = rmse(md,-c);
K = min(K1,K2);
plot(beta,K);
hold on
end

Best Answer

Try
plot(beta,K,'.');
instead
plot(beta,K);
Related Question