What is the output of the following code? [code]>>t=(0:17); >>o=dirac(t)==Inf; >>q=o*1; >>conv(q,t)[/code]

What is the output of the following code?
Code:
>>t=(0:17);
>>o=dirac(t)==Inf;
>>q=o*1;
>>conv(q,t)
A. t followed with 17 zeros
B. t followed with 18 zeros
C. 1
D. Error
 
Answer: a
Explanation: In the above code, we’ve actually performed the impulse response of discrete system defined by a ramp function for [0,17]. Now, the output of the code is shown below which shows that the impulse function gets shifted for the time t and the total result of the convolution will be the entire value. Notice that the length of the convolution is 2N-1=35.
Output:
 

Tìm kiếm

Back
Top