Azzera filtri
Azzera filtri

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$?

14 visualizzazioni (ultimi 30 giorni)
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 Commenti
Torsten
Torsten il 10 Lug 2022
Modificato: Torsten il 10 Lug 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 il 10 Lug 2022
Modificato: Atom il 10 Lug 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);

Accedi per commentare.

Risposta accettata

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

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by