Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
Trending News
1 Answer
- ooorahLv 66 years agoFavorite Answer
If you are trying to simply plot data points, or a line connecting data points, I find "plot" to be fairly simple, although you can get fancy with it. For example:
x = 1:10; % Or whatever x-values
y = 2:20; % Or whatever
plot(x,y)
If you would like to plot a function instead, you can still use "plot":
x = -pi:pi/8:pi;
y = sin(x);
plot(x,y)
But a lot of people like using "ezplot" for that:
ezplot('sin(x)')
Also, if you create the data in the Command Window, you can select the variables in the Workspace Browser and plot them using the "PLOT" tab options.
Source(s): plot: http://www.mathworks.com/help/matlab/ref/plot.html ezplot: http://www.mathworks.com/help/matlab/ref/ezplot.ht... PLOT tab: http://www.mathworks.com/help/matlab/creating_plot...