Contour graph boundary problem

2 Ansichten (letzte 30 Tage)
Cem Eren Aslan
Cem Eren Aslan am 31 Mai 2021
Kommentiert: John D'Errico am 31 Mai 2021
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 Kommentar
John D'Errico
John D'Errico am 31 Mai 2021
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?

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Contour Plots finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by