Graphics
Matlab has outstanding graphics capabilities (you must be using a terminal which supports graphics to use them). However, graphing in Matlab is conceptually different than graphing in Maple or Mathematica.
Graphics Concepts
Before looking at the plotting capabilities of Matlab, consider what a graph really is. A graph is a collection of points, in 2,3 or even 4 dimensions, that may or may not be connected by lines or polygons. Most math software packages hide this from the user by sampling a continuous function to generate the points.Matlab is designed to work with matrices, rather than functions. Matrices are a convenient way to store a collection of numbers - which is exactly what is needed when graphing. Thus all graphing commands in Matlab accept matrices as their argument, rather than a function. If you are used to function-style plotting, Matlab may take some getting used to. On the other hand, Matlab's approach makes it very easy to visualize data and to create graphics based on lists of points.
Another unique feature of Matlab's graphics engine is the way in which it displays graphical output. In Matlab, there is (usually) only one plotting window. Subsequent plotting commands will overwrite the old plot, unless you request a new one be made. This allows a plot to be made, then adjusted later to suit your needs.
Basic 2-D Graphics
Now that you understand a bit more about graphing, try these examples. Be sure to follow along exactly, or you may not get the same results.Matlab provides very powerful features in the figure window. Use the toolbar at the top to add arrows, lines, and text comments to your plot.
Basic 3-D Graphics
Advanced Plotting
Of course, Matlab can do a lot more than these simple exercises. If you'd like to know more, try these help files:help slice , help movie , help getframe , help graph2d , help graph3d , help graphics .













