What is the output of the following code? [code]plot([0:1:4],one(1,5))[/code]

What is the output of the following code?
Code:
plot([0:1:4],one(1,5))
A. A pulse function from 0 to 4 units in time
B. A step function
C. A ramp function
D. Error
 
Answer: d
Explanation: The ones command isn’t completely written i.e an s is missing which leads to an error. The output would’ve been a pulse function from 0 to 4 units in time but due to this, there is an error as an output.
 

Tìm kiếm

Back
Top