![]() The positions in these arrays correspond to parameter or coordinate values The arguments to a MATLAB plotting function, suchĪs surf, plot, plot3, mesh, or contour, are two or three identically shaped arrays. We begin with a brief discussion of how MATLAB does its plotting. Values of the function, and red denoting the largest. Note that MATLAB again color-codes the output, with blue denoting the smallest Two variables is a surface, but not conversely. Graph is a surface, in other words, a two-dimensional geometric object sitting in three-space. Once you execute this command, you can rotate the figure in space to be able to view it from different angles. We will see later why this is so and how to detect it.īut for the time being let's move on. One of the pictures in this case is misleading the contour in dark blue in the very middle should really have The color coding in the contour plot tells us how the values of the constant c are varying. All we need as arguments to ezcontour are the expression, whose contours are to be plotted, and the ranges of values for x and y. (In other words, it is not necessary to use an M-file or an anonymousįunction as an input to the plotting command.)į=((x^2-1)+(y^2-4)+(x^2-1)*(y^2-4))/(x^2+y^2+1)^2 Note that our plotting commands can take as input an expression that defines a function, rather than a function itself. We will take f sufficiently complicated to be of some interest. ![]() We begin by illustrating how to produce these two kinds of pictures in MATLAB, using MATLAB's easy-to-use plotting commands,Įzcontour and ezsurf. ![]() ![]() the graph of the function, which is the set of points (x, y, z) in three-dimensional space satisfying f(x, y) = z.a contour plot, or a two-dimensional picture of the level curves of the surface, which have equations of the form f(x, y) = c, where c is a constant. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |