Combined mesh and contour plotter
The function f is plotted over the default domain –2π < x < 2π, –2π < y < 2π. MATLAB® software chooses the computational grid according to the amount of variation that occurs; if the function f is not defined (singular) for points on the grid, then these points are not plotted.
If f is a function of the variables u and v (rather than x and y), then the domain endpoints umin, umax, vmin, and vmax are sorted alphabetically. Thus, ezmeshc(u^2 - v^3,[0,1],[3,6]) plots u2 – v3 over 0 < u < 1, 3 < v < 6.
ezmeshc(x,y,z) plots the parametric surface x = x(s,t), y = y(s,t), and z = z(s,t) over the square –2π < s < 2π, –2π < t < 2π.
Create a mesh/contour graph of the expression,
over the domain –5 < x < 5, –2π < y < 2π. Use the mouse to rotate the axes to better observe the contour lines (this picture uses a view of azimuth = –65 and elevation = 26).
syms x y ezmeshc(y/(1 + x^2 + y^2),[-5,5,-2*pi,2*pi])