What is the output of the following code? [code]t=linspace(0, 2*pi, .1*pi); plot(t,sin(t)); text[2,-2, ‘Ho !’];[/code]

Pham Quỳnh

New member
What is the output of the following code?
Code:
t=linspace(0, 2*pi, .1*pi); plot(t,sin(t)); text[2,-2, ‘Ho !’];
A. a graph of sin(t)
B. a graph of inverted sin(t)
C. a graph with Ho ! written
D. error
 
Answer: d
Explanation: The input to the text command should be within parentheses. Here, the [] will result in an error. If a parentheses was used, the output would’ve been a graph of sin(t).
 

Tìm kiếm

Back
Top