Hi, I am Struggling to get the hidden error. I just need to put the specific markers at specific points on the chirp graph. The problem is that it gives me the error " 1×0 empty double row vector" at specific line AND when I wrote this line manually to get the indices, I got the answer without error. is that bug or am I missing something? please help. I attach my code you can run and you will get the error at point (301) i.e (x= .3). if you write Y(X==.3), you'll get the answer although it gave you error in the code.
fs=1e3; X = 0:1/fs:2-(1/fs); fo = 1; f1 = 5; Y = chirp(X,fo,X(end),f1,'logarithmic'); points=zeros(2,20); xe =0:.1:X(end); for i=1:length(xe) i index = find(X==xe(i)) X_point=X(index); Y_point= Y(X==xe(i)); points(1,i)=X_point; points(2,i)=Y_point; plot(X,Y,X_point,Y_point,'*') labelstr = sprintf('%d',i); text(X(index)+.05,Y_point, labelstr); hold on end