Sie sind auf Seite 1von 3

Experiment 1

Aim: Design Scilab/Matlab code for standard test signals like Unit Impulse, Unit Step and Unit
Ramp Signals and analyze it.

Apparatus: Matlab

a. Unit Impulse:

Matlab Code:
>> n=-2:0.5:2;
>> x=zeros(1,9);
>> x(1,5)=1;
>> stem(n,x);
>> title('Impulse Signal');
>> ylabel('Amplitude');
>> xlabel('Time');

Output:

Figure 1: Unit Impulse Signal.


b. Unit Step Signal:
Matlab code:
t=-5:0.001:5;
>> y = heaviside(t);
>> plot(t,y);
>> title('Step Response');
>> xlabel('Time');
>> ylabel('Amplitude');

Output:

Figure 2 Unit Step Signal


c. Ramp Signal:
Matlab Code:
>>t=0:1:50;
>>for n=0:50;
x(n+1)=n;
end
>>plot(t,x);
>> title('Ramp Signal');
>> xlabel('Time');
>> ylabel('Amplitude');

Output:

Figure 3 Ramp Signal

Conclusion: We got intimated with various signals and learn how to perform them in
MATLAB.

Das könnte Ihnen auch gefallen