MATLAB: How to plot x^2+z^2=9 above the xy plane and between y=-1 and y=2

between numbersplot

syms x y z;
[x,y,z]=meshgrid(-10:1:10);
Z = realsqrt(9-x^2);
surf(X,Y,Z);

Best Answer

How about:
syms x y z;
[x,y]=meshgrid(-10:1:10);
z = abs(sqrt(9-x.^2));
surf(x,y,z);
ylim([-1 2])
Related Question