MATLAB program for Rampwave signal Generation


Unit Ramp Sequence or Waveform r(n):
This is the ramp up signal which vary linearly with r(n)=n.


Unit Ramp Sequence or Waveform r(n):
N=input ('enter the size of sequence= ');
t=-N:N;
l=length(t);
for ii=1:l;
    if t(ii)>=0
        seq(ii)=t(ii);
    else
        seq(ii)=0;
    end;
end;
stem(t,seq);
title('Ramp Responce');
xlabel('n');
ylabel('Amplitude');

Output Waveform:
Enter the size of sequence= 16



No comments