What is the output of the following code? [code]t=[-10:1:10];plot(t,3*t), text(0,0,’Origin’,color,’blue’,’verticalalignment’,’left’)[/code]

Trang Mắm

New member
What is the output of the following code?
Code:
t=[-10:1:10];plot(t,3*t), text(0,0,’Origin’,color,’blue’,’verticalalignment’,’left’)
A. A ramp function with Origin written in Blue and left alignment
B. A ramp function with Origin written in Blue
C. A ramp function with Origin written in Blue and center left alignment
D. Error
 
Answer: d
Explanation: The left is not the correct value for vertical alignment. The correct values are namely ‘center’, ‘base’, ‘middle’, ‘top’. Hence, the above code will only give an error.
 

Tìm kiếm

Back
Top