Contour graph boundary problem

1 次查看(过去 30 天)
Cem Eren Aslan
Cem Eren Aslan 2021-5-31
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
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 CenterFile Exchange 中查找有关 Contour Plots 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by