Andy's Octave Assignment: Difference between revisions

From Class Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
Line 4: Line 4:
This is an example of some of the different line styles available on Matlab/Octave.
This is an example of some of the different line styles available on Matlab/Octave.


x=0:1:5;
a=1*x;
b=2*x;
c=3*x;
d=4*x;
e=5*x;





Latest revision as of 09:42, 1 October 2010

Changing Line Style on a Plot

Error creating thumbnail: File missing
Plot of the script Xplot.m

This is an example of some of the different line styles available on Matlab/Octave.


plot(x,a,'x')  %changes points to x's

hold on

plot(x,b,'o')  %changes points to o's

hold on

plot(x,c,'*')  %changes points to *'s

hold on

plot(x,d,'+')  %changes points to +'s

hold on

plot(x,e,'.')  %changes points to .'s