Introduction to MATLAB for Engineers and Scientists by Sandeep Nagar

Introduction to MATLAB for Engineers and Scientists by Sandeep Nagar

Author:Sandeep Nagar
Language: eng
Format: epub
Publisher: Apress, Berkeley, CA


meshc

meshc() generates a 3D rectangulated mesh as well as a contour at the base. As shown in Figure 3-15, apart from producing a 3D plot for a given function, you also get a contour plot. Note that at this time, the equation working on matrices is written as an argument of the meshc() function , thus making the program even smaller. See Listing 3-6.

1 x=linspace(−10,10,50);

2 y=linspace(−10,10,50);

3 [xx,yy]=meshgrid(x,y);

4 meshc(xx,yy,2−(xx.ˆ2+yy.ˆ2))

Listing 3-6 The ThreeDMeshc.m Program



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.