cananyone tell me how to plot the time-delayed version of a signal ?
Imagine the simplest case, y=cos(x), I want to delay it by 2 units. But I get some strange results!
clc ; clear all; close all x=(0.00001:0.01:2)*pi; y=cos(x); plot(x,y) hold on [Nrow Ncol]=size(y); m=2; % Delay step z=zeros([Nrow Ncol]); for i=3:Ncol-m j=i-m; z(i,1)=y(j,1);
end plot(z,'r')
Best Answer