12.07.2015 Views

Basics of MATLAB and Beyond

Basics of MATLAB and Beyond

Basics of MATLAB and Beyond

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

x =-1 0 1-1 0 1-1 0 1y =1 1 12 2 23 3 3This set <strong>of</strong> points defines a rectangular domain because the rows <strong>of</strong> xare identical <strong>and</strong> the columns <strong>of</strong> y are identical. We can make a plot <strong>of</strong>the points (as we did on page 25):clfplot(x,y,’.’)Now let us change the y matrix a bit:>> y = [[1; 2; 3] [1; 1.5; 2] [0; .2; .4]]y =1.0000 1.0000 02.0000 1.5000 0.20003.0000 2.0000 0.4000The plot <strong>of</strong> this data looks like a bent triangle:plot(x,y,’.’)To define a surface over this domain we simply have to supply the zvalues. We can start by simply defining a constant z:c○ 2000 by CRC Press LLC

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

Saved successfully!

Ooh no, something went wrong!