Matlab Basics for Powersystem Lab
|
Matlab Basics for Powersystem Lab - Plottings |
|
|
|
|
Tuesday, 03 November 2009 06:34 |
|
Page 4 of 8 PLOTTINGS It is also easy to create plots in Matlab. Suppose you wanted to plot a sine wave as a function of time. First make a time vector (the semicolon after each statement tells Matlab we don't want to see all the values) and then compute the sin value at each time.
t=0:0.25:7; y = sin(t);
plot(t,y)  The plot contains approximately one period of a sine wave. Basic plotting is very easy in Matlab, and the plot command has extensive add-on capabilities. I would recommend you visit the plotting page to learn more about it.
|
|
Last Updated on Tuesday, 03 November 2009 07:38 |