How to plot function f(x,y,z)=c ?

I am new to matlab recently, can you help me plot function cos(x) + cos(y) + cos(z) = c ?

Answers (2)

Torsten
Torsten on 19 Oct 2022
Edited: Torsten on 19 Oct 2022
c = pi/2;
f = @(x,y,z) cos(x) + cos(y) + cos(z) - c
f = function_handle with value:
@(x,y,z)cos(x)+cos(y)+cos(z)-c
fimplicit3(f,[-pi pi -pi pi -pi pi])
Sam Chak
Sam Chak on 19 Oct 2022
Edited: Sam Chak on 19 Oct 2022
Not how it looks. Are you expecting something like this?
c = pi/2;
z = @(x, y) acos(c - cos(x) + cos(y));
fsurf(z, [-pi pi -pi pi]), xlabel('x'), ylabel('y'), zlabel('z')

Asked:

on 19 Oct 2022

Commented:

on 19 Oct 2022

Community Treasure Hunt

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

Start Hunting!