I have MatlabR2019b and I am trying to do a simple plot. I am not able to plot anything unless I use scatter(x,y) or area(x,y). How could I get plot(x,y) to work? I am using a Mac.

1 次查看(过去 30 天)
I have MatlabR2019b and I am trying to do a simple plot. I am not able to plot anything unless I use scatter(x,y) or area(x,y). How could I get plot(x,y) to work? Is there some tool/addon missing? I am using a Macbook Pro with Mojave 10.14.6.
x = linspace(0,2*pi,50);
y = sin(x);
plot(x,y)
hold on
y2 = cos(x);
plot(x,y2)
hold off
Screen Shot 2019-12-14 at 11.15.32 AM.png
Screen Shot 2019-12-14 at 11.17.05 AM.png

采纳的回答

Walter Roberson
Walter Roberson 2019-12-14
You need to rename plot.m in the untitled folder directory as it is overriding the Mathworks plot call

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 2-D and 3-D Plots 的更多信息

产品


版本

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by