3D plot a function f(x,y,z)
42 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have a function of the coordinates x,y and z like the following :
function f= f(x,y,z)
if (x>0) & (y<1) % this is just an example, do whatever you want with the variables
f= 1;
else
f= x-y+2*z;
end
end
That I want to plot like by using the fimplicit3() function :
syms f(x,y,z)
f(x,y,z) = x^2 + y^2 - z^2;
fimplicit3(f)
The problem is fimplicit3 deals with the symbolic variables but fails to take as argument a function that I 'manually' specified above.
Is there another way to plot such a function ?
I just wanna draw some balls in space.
0 Kommentare
Antworten (2)
Drc
am 20 Apr. 2023
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1362053/image.jpeg)
1 Kommentar
DGM
am 20 Apr. 2023
Bearbeitet: DGM
am 20 Apr. 2023
Start a new question at the "Ask" link at the top of the page. Include enough information so that other people know specifically what you want. Considering that specific details were intentionally omitted from the image, I have to wonder why you're making it difficult.
Siehe auch
Kategorien
Mehr zu Surface and Mesh Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!