% FOR CHECKING SYSTEM IS TIME VARIANT OR INVARIANT (1ST BIT)
clcclear allclose allt=-5:0.001:5l=length(t)for i=1:l if t(i)>=0 x1(i)=1; else x1(i)=0; endendx2=cos(pi*t)x3=cos(pi*(t-1))y1=x1.*x2y2=x1.*x3subplot(4,1,1)plot(t,x1)xlabel('t')ylabel('x1')title('for x1')grid ongtext('1841014009')subplot(4,1,2)plot(t,y1)xlabel('t')ylabel('y1')title('for y1')grid ongtext('1841014009')subplot(4,1,3)plot(t,x2)xlabel('t')ylabel('x2')title('for x2')grid ongtext('1841014009')subplot(4,1,4)plot(t,y2)xlabel('t')ylabel('y2')title('for y2')grid ongtext('1841014009')if round(y1)==round(y2) disp('time invariant'); else disp('time variant');end
This is what i have done.
please help me.
Best Answer