29.11.2014 Views

Advanced Plotting and Model Building - FET

Advanced Plotting and Model Building - FET

Advanced Plotting and Model Building - FET

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

Example to plot 3D<br />

5-64<br />

If you want to see the famous Mexican hat<br />

, type the following comm<strong>and</strong>s :<br />

>> [x y] = meshgrid(-8:0.5:8);<br />

>> r = sqrt(x.ˆ2 + y.ˆ2) + eps;<br />

>> z = sin(r)./r;<br />

>> mesh(z);<br />

Why + eps ?<br />

Try surf(z) to generate a faceted (tiled)<br />

view of the surface.<br />

Then try with surf(z) the shading<br />

interp comm<strong>and</strong>.<br />

Z.R.K

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

Saved successfully!

Ooh no, something went wrong!