3D graph F(x y z)

Hello, I'm trying to draw this function(F) on Mathlab, but I don't know which command to use.
L = (3/2).*(1E-10);
figure [x,y,z] = meshgrid(0:L/50:L,0:L2/50:L,0:L3/50:L);
F=sin(x)*sin(y)*sin(z)
Thank you for your help

Respuestas (2)

Wayne King
Wayne King el 14 de Sept. de 2012
Editada: Wayne King el 14 de Sept. de 2012

0 votos

Hi Lex, you haven't told us what L2 or L3 is here, but you have a few issues.
First
L = (3/2).*(1E-10);
0:L/50
What do you think the above creates? This will simply be 0 because you are saying "give me a vector which increments from 0 to basically 10^{-10} in steps of 1. So that will just give you a zero.
The other problem is that on the face of it you are creating an NxMxK array and a 3D plot is only going to work if your ultimate output
F=sin(x).*sin(y).*sin(z);
Is 2-D or a NxMx3 matrix.
Lex Ken
Lex Ken el 14 de Sept. de 2012

0 votos

Thanks L=L2; L=L3;
Alright, using
F=sin(x).*sin(y).*sin(z);
which command should I use to plot the graph ?

1 comentario

Wayne King
Wayne King el 14 de Sept. de 2012
You did not address the fact that you are creating an "array" that consists of just 0. See my questions above.

Iniciar sesión para comentar.

Categorías

Más información sobre Develop Apps Using App Designer en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 14 de Sept. de 2012

Community Treasure Hunt

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

Start Hunting!

Translated by