Plot in 3D a quadratic function

3 次查看(过去 30 天)
safae safae
safae safae 2011-5-18
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

回答(1 个)

Brenden
Brenden 2011-7-13
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

类别

Help CenterFile Exchange 中查找有关 Surface and Mesh Plots 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by