One of the main elements of programming is looping. Within MATLAB
there are a variety of ways to create program loops to achieve "repetition".
The general form of a simple "for loop" is
something to be
something else to
Notice that there is a "comma" at the end of the line
starting the "for loop". This is required !!!
Here is an example of plotting the of sin(ax) against x for a
series of different "a" values.
>> hold on;
>> for i=1:length(c),
The plot obtained is:
While on the subject of handling graphs, be aware that it is trivial
to export your figures in many convenient formats. For example,
you can use the popular jpg format or bmp, etc.
Just go to the "File" menu in the plot window and select
"Export" and choose the format you wish to store the graph
in. Nothing hard at all about it !!