t=0:0.0001:0.1;
y=sin(2*pi*30*t);
figure;
plot(t,y);
hold on;
plot(t-0.05,y,'r');
legend('平移前','平移后');
%subs是用于符号函数平移的,例如
syms t;
y=sin(2*pi*30*t);
y1=subs(y,t,t+0.05);
figure;
subplot(211);
ezplot(y,[0,0.1]);
grid;
subplot(212);
ezplot(y1,[0,0.1]);
grid;