What will be the output of the following code? [code]T=-5:1:5; y=sin(T); plot(T,y)[/code]

What will be the output of the following code?
Code:
T=-5:1:5; y=sin(T); plot(T,y)
A. No output
B. A perfect sine curve
C. A broken sine curve
D. Cannot be determined
 
Answer: c
Explanation: The sine curve is a continuous signal or a discrete signal. So the tendency of every point in the curve has to follow a radian frequency and not a step frequency. Here the frequency of time is stepping up by 1, so the sine curve will only consist of 11 values, which will lead to the sine curve appearing to be broken.
Output:
 

Tìm kiếm

Back
Top