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.

s = 100*spiral(3)s =700 800 900600 100 200500 400 300>> ind = find(s>400)ind =12347>> s(ind)ans =700600500800900>> s(s>400)ans =700600500800900After introducing graphics <strong>of</strong> functions <strong>of</strong> two variables in the next section,we will see how the find comm<strong>and</strong> can be used to do the threedimensionalequivalent <strong>of</strong> the plot shown on page 23, where the domain<strong>of</strong> a curve satisfying a logical test was extracted.7 Graphics <strong>of</strong> Functions <strong>of</strong> Two Variables7.1 Basic PlotsA matlab surface is defined by the z coordinates associated with a set<strong>of</strong> (x, y) coordinates. For example, suppose we have the set <strong>of</strong> (x, y)coordinates:(x, y) =⎛⎜⎝1, 1 2, 1 3, 1 4, 11, 2 2, 2 3, 2 4, 21, 3 2, 3 3, 3 4, 31, 4 2, 4 3, 4 4, 4The points can be plotted as (x, y) pairs:⎞⎟⎠ .c○ 2000 by CRC Press LLC

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

Saved successfully!

Ooh no, something went wrong!