Plot in 3D a quadratic function

5 views (last 30 days)
safae safae
safae safae on 18 May 2011
Hi, I want to see this function
f(x,y,z)=x^2-y^2-z^2>=0
such that (x,y,z) in [0 1]^3.
I tried
------------------------------
[X,Y] = meshgrid([0:0.01:1]);
Z = sqrt(X.^2-Y.^2);
plot3(X,Y,Z)
grid on
------------------------------
and
------------------------------
[x, y] = meshgrid([0:.01:1]);
z = sqrt(x.^2 - y.^2);
surf(x,y,z.^2)
------------------------------
I don't know if this is correct, any suggestion?
Thank you

Answers (1)

Brenden
Brenden on 13 Jul 2011
I am currently trying to plot 4 dimensional data in a 3D plot as well and i think one solution is to use scatter3(x,y,z,f(x,y,z)) where x y z are the coordinates and f(x,y,z) describes the size... havent done it yet but seems like it might work

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!