Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- t1=(0:0.0001:0.5);
- x1 = 1 - 2.*t1;
- x5 = 0.25
- for n = 1:5
- x5 = x5 + [(2.*(1-cos(pi.*n)).*(1/(2.*(pi^2).*(n^2)))) - (2.*j/(2.*pi.*n))].*exp(j.*n.*2.*pi.*t1);
- end
- x50 = 0.25
- for n = 1:50
- x50 = x50 + [(2.*(1-cos(pi.*n)).*(1/(2.*(pi^2).*(n^2)))) - (2.*j/(2.*pi.*n))].*exp(j.*n.*2.*pi.*t1);
- end
- t2=(1:0.0001:1.5);
- plot(t1,x1,t1,x5,t1,x50, t2,x1,t2,x,t2,x50)
- axis([0 2 -1 2])
- grid on
Add Comment
Please, Sign In to add comment