EGR_102_Lab_06B_2D_Plotting

# EGR_102_Lab_06B_2D_Plotting - MATLAB 2D Plotting Tools EGR...

This preview shows pages 1–7. Sign up to view the full content.

MATLAB ® 2D Plotting Tools EGR 102 - Lab 06B 1

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
MATLAB 2-D plotting The ezplot function can be used to create quick plots, but has limited uses The plot function can be used for nearly all applications: Plotting equations, vectors of data, etc. You can customize the “look” of each plot Creating overlay plots and subplots It requires input vectors containing the x (independent) and y (dependent) values to plot a series of points EGR 102 - Lab 06B 2
Customizing plots Specifying the formatting of the plot display: plot(x,y,'LineSpec'); LineSpec specifies the following properties: Line style Line width Color Marker type Marker size Marker face and edge coloring (for filled markers) EGR 102 - Lab 06B 3

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Customizing plots See MATLAB Help for LineSpec capabilities For example: plot(x,y,'r') plots a red line plot(x,y,'--') plots a dashed line plot(x,y,'.') plots just point markers plot(x,y,'--.r') plots a red, dashed line with point markers The default style is a blue, solid line without markers EGR 102 - Lab 06B 4
Customizing plots Use plot() to graph numerical data measured, as in the following table, from a thermocouple calibration EGR 102 - Lab 06B 5 Temp Voltage 50 0.00159 100 0.00386 150 0.00607 200 0.00821

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Customizing plots Create a function file to plot the data EGR 102 - Lab 06B 6 Notice that the function has no outputs. The plot
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 16

EGR_102_Lab_06B_2D_Plotting - MATLAB 2D Plotting Tools EGR...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online