ezplot z2=x2+y2 in matlab

To plot the function z^2 = x^2 + y^2 in MATLAB, you can use the ezplot function as follows:

main.m
ezplot('x^2 + y^2')
20 chars
2 lines

This command will generate a 2D plot of the function, with x and y on the axes and z represented by the color of the plot.

If you want to generate a 3D surface plot instead of a 2D plot, you can use the ezsurf function:

main.m
ezsurf('x^2 + y^2')
20 chars
2 lines

This will generate a 3D surface plot of the function, where the height of the surface is proportional to the value of z.

gistlibby LogSnag