What is the output in the following code? [code]x=-10:1:10; y=-10:1:10;axis(‘off’); plot(x,y)[/code]

Daniel William

New member
What is the output in the following code?
Code:
x=-10:1:10; y=-10:1:10;axis(‘off’); plot(x,y)
A. Error
B. A graph will be shown without axes
C. A graph will be shown with axes
D. 2 graphs will be shown- one with axes and with no axes
 
Answer: c
Explanation: We have used the axis command before the plot command. So, the plot hasn’t been created before the axis command is invoked. Hence a graph of x and y will be shown which will have axes.
 

Tìm kiếm

Back
Top