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

24 ビュー (過去 30 日間)
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 件のコメント
Torsten
Torsten 2022 年 7 月 10 日
編集済み: Torsten 2022 年 7 月 10 日
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 2022 年 7 月 10 日
編集済み: Atom 2022 年 7 月 10 日
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);

サインインしてコメントする。

採用された回答

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by