Professional Documents
Culture Documents
>
s s
< s
< s +
<
= =
5 0
5 3 5
3 1 2
1 1 1
1 0
*
t
t t
t
t t
t
y x z
7.
>> del=.01;
>>x=boxtscript(-5,10,0,4,del);
>>y=boxtscript(-5,10,-1,1,del);
>>subplot(3,1,1);
>>plot(x)
>>grid on
>>subplot(3,1,2);
>>plot(y)
>>grid on
>> suplot(3,1,3);
>> subplot(3,1,3);
>> plot(conv(x,y).*del)
>> grid on
8. Triangle: Design the impulse response for a system h and a system input x such
that you get a perfectly symmetric triangle of length 100 as the system output y.
Use subplot to plot x,h, and y, and save the plot as tri.tif.
>> del=.01;
>>h=boxtscript(-1,3,0,0.5,del);
>>x=2.*boxtscript(-1,3,-0,0.5,del);
>>subplot(3,1,1);
>>plot(h)
>> grid on
>> subplot(3,1,2);
>>plot(x)
>> grid on
>> subplot(3,1,3);
>>plot(conv(h,x).*del);
>> grid on
>> soundsc(conv(h,x).*del,8000)