필터 지우기
필터 지우기

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