clear all; close all; clc
You assign a vector of length 201 to t at this point
x=sin(2*pi*fi*t + 0.3)+transpose(ww);
17 different j iterations
You overwrite t with a vector of length m*N+1 = 13
x=sin(2*pi*fi*t + 0.3)+transpose(wgn(1+N*m,1,-40));
bb=0.42 - 0.5*cos(2*pi*n/(m*N+1)) + 0.08*cos(2*pi*n/(m*N+1));
[maxVal maxInd] = max(ff);
So 17 different fr values
13 locations plotted, using their index as the t value
RMSE = sqrt(mean(((fr/100)-fi).^2))
title('GABOR white noise')
You are after the for loop. t has the same value it was last assigned:
And fi was only ever assigned a scalar, so you are drawing with multiple different t values and a single fi value. You will get a series of dots as the result... down around time 1.
What can you do? Well, you could record the first t (or middle if you want) associated with each j iteration, so that when you
you could put in the time vector, so that at least the constant fi values would be plotted on the same time scale as the fr values.
Or maybe instead of the
you should instead
if your purpose is to plot a reference line. Though keep in mind that your plot of fr is not plotting against absolute time...