- r/matlab: Official MATLAB subreddit - a place to discuss the MATLAB programming language and its implementation. Press J to jump to the feed. Press question mark to learn the rest of the keyboard shortcuts
- plot(x,y) xlabel('x') ylabel('y') title('A plot of Cosine(x)') Save the file using the Save Option under the File Menu in the M-File Editor Window. Call it, say, cosineplot.m. Now, to run this program in Matlab, move over to the Matlab Command Window and just type in >> cosineplot (Back to top)
- plot(x,y) creates an Cartesian plot of the vectors x & y. semilogx(x,y) plots log(x) vs y. grid creates a grid on the graphics plot. title('text') places a title at top of graphics plot.