MATLAB - 2D Plotting
What will be the output of this MATLAB code?
x = 0:0.5:2;
plot(x, x.^2);
hold on;
plot(x, x+1);
x = 0:0.5:2;
plot(x, x.^2);
hold on;
plot(x, x+1);
plot draws y = x^2.hold on and plot linear functionhold on keeps the first plot visible, so the second plot adds y = x + 1 on the same figure.hold on adds plots together = D [OK]hold on to combine plots in one figure [OK]figure commandhold onhold on causes error15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions