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.

subplot(2,2,2)claAs long as your subplots are based on an array <strong>of</strong> 9 × 9 little plots orless, you can use a simplified syntax. For example, subplot(221) orsubplot 221 are equivalent to subplot(2,2,1). You can mix differentsubplot arrays on the same figure, as long as the plots do not overlap:subplot 221plot(1:10)subplot 222plot(0,’*’)subplot 212plot([1 0 1 0])4.6 Three-Dimensional PlotsThe plot3 comm<strong>and</strong> is the 3-d equivalent <strong>of</strong> plot:t = 0:.1:2*pi;plot3(cos(3*t),sin(3*t),t)The three dimensional spiral can be better visualised by changing theorientation <strong>of</strong> the axes. You can invoke a mouse-based 3-d axis moverby typing:rotate3dIf you click the mouse button down on the plot <strong>and</strong> drag, you can movethe axes <strong>and</strong> view the plot from any angle. Release the mouse button toredraw the data. Type rotate3d again to turn <strong>of</strong>f this behaviour.c○ 2000 by CRC Press LLC

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

Saved successfully!

Ooh no, something went wrong!