clear
syms t
x1(t)=cos(t);
y1(t)=1-2*x1(t-1);
x2(t)=cos(t-3);
y2(t)=1-2*x2(t-1);
for t=-pi():.1:pi()
Check_Y=vpa(y1(t-3),2);
Check_X=vpa(y2(t),2);
if Check_X~=Check_Y
disp('Not time invarient')
break
end
if t==-pi()+6.2
disp('Time invarient')
end
end
t=-pi():.1:pi();
figure
subplot(3,1,1)
plot(t,y1(t))
title('x(t):y(t)')
subplot(3,1,2)
plot(t,y2(t))
title('x(t-3):y(t)')
subplot(3,1,3)
plot(t,y1(t-3))
title('y(t-3)')
Try with vpa for check variables.
