You are on page 1of 1

RAMP & TRAINGULAR SIGNAL

clc;
clf;
n=input('enter the lenght of ramp sequence N=');
t=0:40;
subplot(2,2,1);
stem(t,t);
axis([0,40,0,40]);
ylabel('amplitude');
xlabel('time index');
title('ramp signal');
subplot(2,2,2);
y=[0:1:10 9:-1:0 -1:-1:-10 -9:1:0];
t=0:40;
stem(t,y);
axis([0,40,-10,10]);
ylabel('amplitude');
xlabel('time index');
title('traingular signal');

You might also like