Contour graph boundary problem
조회 수: 2 (최근 30일)
이전 댓글 표시
X =linspace(-4.5,4.5);
Y =linspace(-4.5,4.5);
[X,Y] = meshgrid(X,Y);
Z= 3426.8/63.3+660*X*4/3.14/4.5^4+1700*Y*4/3.14/4.5^4;
contourf(X,Y,Z)
Output is numerically correct but the structure I analyzed is in the form of a circle but in the output graph it looks like a square.How can i fix it? How can i make it circle?
댓글 수: 1
John D'Errico
2021년 5월 31일
Z is the equation of a PLANE. Z is LINEAR in the variables X and Y.
Then, you generated values in a square region. Plotting a planar surface over a square region in the (X,Y) plane, so Z(X,Y). The net result of what you did will be straight, parallel lines in a square region.
Is there any reason you would expect to see a circle arise from that in any sense? NO.
MATLAB cannot read your mind, nor can I. So what did you expect to see? Are you looking to plot contours of a planar surface over a circular region? Are you thinking you want to create a paraboloid of revolution, and then plot contours of that surfce, which would indeed be circular?
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Contour Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!