How to plot the surface of the parabolic cylinder $y^2=8x$ in the first octant bounded by the planes $y=4$ and $z=6$?

15 visualizaciones (últimos 30 días)
How to plot the surface of the parabolic cylinder in the first octant bounded by the planes y=4 and z=6?
Y = linspace(0,4,100);
Z=linspace(0,6,100);
surf(Y.^2/8,Y,Z);
I have parametrized the cylinder as , . But unable to plot the desired surface.
Please help to generate the surface
  2 comentarios
Torsten
Torsten el 10 de Jul. de 2022
Editada: Torsten el 10 de Jul. de 2022
If you had read the documentation for "surf", you would have noticed that it's necessary to use "meshgrid" for the ranges of X and Y in order to plot Z:
Atom
Atom el 10 de Jul. de 2022
Editada: Atom el 10 de Jul. de 2022
Is it like this?
[X,Y] = meshgrid(0:.5:6);
Y = linspace(0,4,100);
Z=linspace(0,6,100);
surf(Y.^2/8,Y,Z);

Iniciar sesión para comentar.

Respuesta aceptada

KSSV
KSSV el 10 de Jul. de 2022
y = linspace(0,4) ;
z = linspace(0,6) ;
[Y,Z] = meshgrid(y,z) ;
X = Y.^2/8 ;
surf(X,Y,Z)

Más respuestas (0)

Categorías

Más información sobre Surface and Mesh Plots en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by