What does the following code generate? [code]p=ones(1,90); t=(0:1:89); plot(t,p);[/code]

What does the following code generate?
Code:
p=ones(1,90);
t=(0:1:89);
plot(t,p);
A. A graph of a unit step function
B. A graph of a pulse function
C. A graph of a triangular pulse function
D. An impulse function
 
Answer: b
Explanation: The unit step function extends upto infinity and it’s not possible to represent it graphically. The above code plots a pulse function, of amplitude 1 which extends upto 89 units in time and is represented by u(t)-u(t-89). It doesn’t generate an impulse or a triangular pulse function.
 

Tìm kiếm

Back
Top