Effacer les filtres
Effacer les filtres

How can I plot Earth (wgs84 Ellipsoid)?

74 vues (au cours des 30 derniers jours)
Matthes Müller
Matthes Müller le 27 Nov 2017
Commenté : Matthes Müller le 13 Déc 2017
I have tried
[x,y,z] = wgs84Ellipsoid('meters');
figure
surf(x,y,z)
axis equal
However,
[x,y,z] = wgs84Ellipsoid('meters');
is incorrect ("Too many output arguments")
  2 commentaires
Geoff Hayes
Geoff Hayes le 27 Nov 2017
Matthes - according to https://www.mathworks.com/help/map/ref/wgs84ellipsoid.html the function wgs84ellipsoid returns a referenceEllipsoid object and so the error message makes sense since only one output parameter is possible
E = wgs84ellipsoid('meters');
So that explains the error message. As for trying to draw/plot this, I'm not sure how you would do that (or if it is even possible).
Matthes Müller
Matthes Müller le 30 Nov 2017
Alright, thanks a lot anyway!

Connectez-vous pour commenter.

Réponse acceptée

Amy Haskins
Amy Haskins le 12 Déc 2017
To just get a sense for the shape of the ellipsoid, you could use the values from the wgs84ellipsoid in conjunction with MATLAB's ellipsoid function as follows:
ellipsoid(0,0,0,E.SemimajorAxis, E.SemimajorAxis, E.SemiminorAxis)
Alternatively, if you want a 3D globe, you could follow the doc example here:
https://www.mathworks.com/help/map/examples/plotting-a-3-d-dome-as-a-mesh-over-a-globe.html
Replacing the grs80 ellipsoid with the one returned by wgs84Ellipsoid.
  1 commentaire
Matthes Müller
Matthes Müller le 13 Déc 2017
Perfect, thank you!

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by