You are on page 1of 2

%AIM: To generate sine, cosine, exponential, unit step, unit ramp signals.

t=linspace(0.00,0.999,1000);
yt=sin(2*pi*10*t);
subplot(2,3,1);
stem(t,yt);
xlabel('t');
ylabel('sin t');
title('SINE function');
t=linspace(0.00,0.99,100);
yt=cos(2*pi*10*t);
subplot(2,3,2);
stem(t,yt);
xlabel('t');
ylabel('cos t');
title('COSINE function');
x=linspace(0.00,0.99,100);
yx=exp(x);
subplot(2,3,3);
plot(x,yx);
xlabel('x');
ylabel('exp x');
title('EXP function');
t=linspace(0.00,0.99,100);
y=ones(100,1);
subplot(2,3,4);
stem(y);
xlabel('t');
ylabel('u(n)');
title('UNIT STEP function');
t=linspace(0.00,0.99,100);
subplot(2,3,5);
y=t;
stem(y);
xlabel('t');
ylabel('r(n)');
title('UNIT RAMP function');

You might also like