You are on page 1of 2

Fatima open ended

t=0:0.01:10;
xt=sin(2*pi*t);
yt=cos(2*pi*t);
plot(t,xt);
hold on
plot(t,yt);
legend('sin','cos');
hold off

Output

1
sin
0.8 cos

0.6

0.4

0.2

-0.2

-0.4

-0.6

-0.8

-1
0 1 2 3 4 5 6 7 8 9 10

sohira
Open ended
t=0:10;
x=[0 1 0 1 0 1 0 1 0 1 0];
y=-x;
plot(t,x,'r','linewidth',2);
hold on;
plot(t,y,'g','linewidth',2);
1

0.8

0.6

0.4

0.2

-0.2

-0.4

-0.6

-0.8

-1
0 1 2 3 4 5 6 7 8 9 10

You might also like