12.07.2015 Views

Basics of MATLAB and Beyond

Basics of MATLAB and Beyond

Basics of MATLAB and Beyond

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

4.2 Adding PlotsWhen you issue a plot comm<strong>and</strong> matlab clears the axes <strong>and</strong> producesa new plot. To add to an existing plot, type hold on. For example trythis:plot(x,y)hold onplot(5*x,5*y)matlab re-scales the axes to fit the new data. The old plot appearssmaller. Once you have typed hold on, all subsequent plots will beadded to the current axes:plot(x,x)Companion M-Files Feature 1 If you decide you want to removethe last thing you plotted on a plot with hold on in force,you can type:undoto get back to where you were before.To switch <strong>of</strong>f the hold behaviour, type hold <strong>of</strong>f. Typing hold by itselftoggles the hold state <strong>of</strong> the current plot.c○ 2000 by CRC Press LLC

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!