I want to plot the function The function is defined for . With
f = @(x,y)sqrt(y-x.^2);
fmesh(f,[-3 3 0 9])
I get a mesh plot of the function in the rectangle [-3,3]X[0,9]. I want to plot the function using meshgrid. The following code results to complex values error message.
x = -3:1:3
y = 0:1:9
[X, Y] = meshgrid(x,y)
Z = sqrt(Y-X.^2)
The problem is that Z is evaluated for not suitable pairs of (X,Y). What am I doing wrong?