User Tools

Site Tools


plots

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
plots [2015/08/29 10:03]
petersen removed
— (current)
Line 1: Line 1:
-===== Plots ===== 
- 
-Plots allow the user to graphically compare two variables together. The basic syntax is 
-  
-plot(X , Y, S).  
-  
-X is an array consisting of x coordinates and Y is an array consisting of Y coordinates. S allows the user to select various line types. If you type in “help plot” in the command window you can see this section that explains the purpose of S. 
- 
-{{ :​plots.png?​500 |}} 
- From Matlab ​ 
- 
-You can also plot multiple Xs, Ys, and Ss using the following syntax. 
-  
-plot(X1, Y2, S1, X2, Y2, S2, Xn, Yn, Sn); 
- 
-When you create a plot Matlab will display it on a figure 
- 
- 
- 
-The following are useful commands associated with plots 
- 
-To adjust the x and y axis limits 
-xlim( [Xmin Xmax]) 
-ylim( [Ymin Ymax]) 
- 
-To write a header 
-text(‘insert text here’) 
- 
-Create labels on the x and y axis 
-xlabel(‘insert label here’) 
-ylabel(‘insert label here’) 
- 
- 
-place multiple graphs on the same figure 
-hold on 
- 
-create a legend 
-legend(string1,​ string2, string, ‘location’,​ string_of_location) 
-‘location’ is to indicate that you will tell matlab where to put the legend 
- 
-Specify which figure to use. 
-figure(x); ​  x = 1, 2, 3 ……. 
- 
- 
  
plots.1440864181.txt.gz · Last modified: 2015/08/29 10:03 by petersen