Engineering Fundamentals: An Introduction to Engineering, 4th ed.c

(Steven Felgate) #1

482 Chapter 15 MATLAB


■Figure 15.14 MATLAB’s Line Property Editor.


For example, if you issue the command plot (x,y,'k*-'),MATLAB will plot the
curve using a black solid line with an *marker shown at each data point. If you do not spec-
ify a line color, MATLAB automatically assigns a color to the plot.
Using the title('text')command, you can add text on top of the plot. The
xlabel('text')command creates the title for the x-axis. The text that you enclose
between single quotation marks will be shown below the x-axis. Similarly, the ylabel
('text')command creates the title for the y-axis. To turn on the grid lines, type the
command grid on(or just grid). The command grid offremoves the grid
lines. To turn on the minor grid lines, as shown in Figure 15.13, type the command grid
minor.

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).

圀圀圀⸀夀䄀娀䐀䄀一倀刀䔀匀匀⸀䌀伀䴀圀圀圀⸀夀䄀娀䐀䄀一倀刀䔀匀匀⸀䌀伀䴀

Free download pdf