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

13 views (last 30 days)
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 Comments
Torsten
Torsten on 10 Jul 2022
Edited: Torsten on 10 Jul 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 on 10 Jul 2022
Edited: Atom on 10 Jul 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);

Sign in to comment.

Accepted Answer

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

More Answers (0)

Community Treasure Hunt

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

Start Hunting!