Notice! This document is currently in Archived status.
The content of this document may be incorrect or out dated.

Professor Bourman's Matlab Tutorial

1-D PLOTTING

>> x=1:20;
>> y=x.*x;                      (square each element)
>> plot(x,y)

image


>> pi

ans =

3.1416

>> x=-pi:0.1:pi;                (0.1 step size)
>> y=cos(x);                    (element by elemt cosine)
>> plot (x,y)                   (cosine plot)

image


>> z=sin(x);
				(cosine and sine plot)
>> plot(x,y,x,z)`

image



>> print                        (prints to printer)
>> print sinwaves.ps -dps       (dumps postscript)

Last modified: 2007/03/20 17:12:16.078000 GMT-4 by Unknown
Created: 2007/03/20 17:12:16.078000 GMT-4 by brian.r.brinegar.1.

Categories

Search

Type in a few keywords describing what information you are looking for in the text box below.

Admin Options: Edit this Document