Azzera filtri
Azzera filtri

Plot in 3D a quadratic function

3 visualizzazioni (ultimi 30 giorni)
safae safae
safae safae il 18 Mag 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

Risposte (1)

Brenden
Brenden il 13 Lug 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

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by