The following are the letters you can add to your code to control the color of your plot while plotting in Matlab.
b blue
g green
r red
c cyan
m magenta
y yellow
k black
w white
Let’s try some variants on the following example.
The default code to plot is:
[php]x=-100:0.5:100;
y=x.^5-x.^2;
plot(x,y)[/php]
Just like it is to change the color of your plot in Matlab, the same goes for changing the line style, increasing the thickness of the line or some other aspect of it
Let’s go ahead a plot the following code
[php] x=-100:0.5:100;
y=x.^5-x.^2;
plot(x,y,’–r’)[/php]
Subplot helps have plots side by side on the same sheet. Here is what Matlab says about it. (Use Help Subplot)
subplot Create axes in tiled positions.
H = subplot(m,n,p), or subplot(mnp), breaks the Figure window into an m-by-n matrix of small axes, selects the p-th axes for the current plot, and returns the axes handle. The axes are counted along the top row of the Figure window, then the second row, etc. For example,
subplot(2,1,1), PLOT(income)
subplot(2,1,2), PLOT(outgo