필터 지우기
필터 지우기

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 (최근 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 CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by