Azzera filtri
Azzera filtri

plotting concentric circles using contour

9 visualizzazioni (ultimi 30 giorni)
I'm trying to plot a few concentric circles with the following codes, but what I get is an ellipse, i don't know why:
[x,y] = meshgrid(-3:0.1:3,-3:0.1:3);
z = x.^2+y.^2;
contour(x,y,z)

Risposta accettata

Star Strider
Star Strider il 26 Ott 2020
Use the axis function, specifically either:
axis('equal') % Function Expression
or:
axis equal % Command Expression
.
  5 Commenti
Star Strider
Star Strider il 27 Ott 2020
As always, my pleasure!

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Contour Plots in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by