- Graphing : Evaluation
Suppose there are two vectors x and y of equal lengths. What is the
correct code to plot a Basic X-Y plot? - correct answersplot(x,y)
Once you complete all your editing in the Figure Window, can you close or
reuse the figure, and are all your edits automatically saved? - correct
answersNo
You can plot directly from the Workspace and the Plot toolstrip. - correct
answersTrue
Which option is the correct code that produces the following plot? -
correct answersclear, clc, clf %reset windows
x = -1 : 0.1 * pi : 2 * pi + 1
plot(x, sin(x), 'g--')
hold on; %freezes plot
plot(x, cos(x), 'r:')
xlabel('Angle in radians')
ylabel('sin(x) & cos(x)')
legend('sin(x)', 'cos(x)')
What correct code produces the following plot? - correct answersclear,
clc, clf %reset windows
%Define the variables
atomic_number = [ 3, 11, 19, 37, 55] ;
melting_point = [ 181, 98, 63, 34, 28.4 ] ;
atomic_radius = [0.152, 0.186, 0.227, 0.2480, 0.2650 ] ;
%%Plot using two y axes
plot(atomic_number, melting_point)
title('Periodic Properties')