Time Invariant or Time Variant| Using MATLAB|

Time Invariant or Time Variant Write the program for given function 𝒚[𝒏] = 𝒔𝒊𝒏[𝒙(𝒕)] and check either it is Time Invariant or Time Variant. Use 𝐜𝐨𝐬(𝒕) as 𝒙(𝒕)

Sources codes 

Shift function:

function[y,n]=shift(x,t0,t);

y=x;

n=t+t0;

end

task1:

 

t=0:0.1:50;

xt1=cos(t);

yt1=sin(xt1);

[xt2,t1]=shift(xt1,2,t);

subplot(2,1,1);

plot(t,yt1)

title('Lab 5')

legend('without shiftting')

xlabel('X')

ylabel('Y1')

subplot(2,1,2)

yt2=sin(xt2);

plot(t,yt2)

title('Lab 5')

legend('with shiftting')

xlabel('X')

ylabel('Y2')

Result:






Post a Comment

0 Comments