Hello,
I am having trouble getting plot() to work. My code works if I use scatter() instead of plot(). If I used plot(), then I get Error in plot(x,y). Can someone please tell me why plot is not working? Thanks!
x = 1:10;
y = x.^2;
figure
hold on
plot(x,y)
hold off
6 Comments
Direct link to this comment
https://nl.mathworks.com/matlabcentral/answers/427469-scatter-working-but-not-plot#comment_631441
Direct link to this comment
https://nl.mathworks.com/matlabcentral/answers/427469-scatter-working-but-not-plot#comment_631441
Direct link to this comment
https://nl.mathworks.com/matlabcentral/answers/427469-scatter-working-but-not-plot#comment_631447
Direct link to this comment
https://nl.mathworks.com/matlabcentral/answers/427469-scatter-working-but-not-plot#comment_631447
Direct link to this comment
https://nl.mathworks.com/matlabcentral/answers/427469-scatter-working-but-not-plot#comment_631456
Direct link to this comment
https://nl.mathworks.com/matlabcentral/answers/427469-scatter-working-but-not-plot#comment_631456
Direct link to this comment
https://nl.mathworks.com/matlabcentral/answers/427469-scatter-working-but-not-plot#comment_631546
Direct link to this comment
https://nl.mathworks.com/matlabcentral/answers/427469-scatter-working-but-not-plot#comment_631546
Direct link to this comment
https://nl.mathworks.com/matlabcentral/answers/427469-scatter-working-but-not-plot#comment_631552
Direct link to this comment
https://nl.mathworks.com/matlabcentral/answers/427469-scatter-working-but-not-plot#comment_631552
Direct link to this comment
https://nl.mathworks.com/matlabcentral/answers/427469-scatter-working-but-not-plot#comment_631675
Direct link to this comment
https://nl.mathworks.com/matlabcentral/answers/427469-scatter-working-but-not-plot#comment_631675
Sign in to comment.