lat long radius to XYZ
Mostrar comentarios más antiguos
i have the following matrix that contains latitude, longitude and radius of a planet and i would like to convert to xyz and plot it in 3d but when i use the sph2cart function and then i plot xyz i get the picture below it seems to becoming out as bands 


3 comentarios
the cyclist
el 19 de Jul. de 2019
What is your question?
Are you certain that the original data doesn't correspond to bands like that?
Can you upload your data and code? An image of a small segment of your data is fairly useless.
David Goodmanson
el 19 de Jul. de 2019
Editada: David Goodmanson
el 19 de Jul. de 2019
HI Ahmed,
Just looking at the small data set you posted,
entries 2 through 8 have the same longitude, varying latitude
entries 9 through 22 have the same longitude, varying latitude
etc. which describes vertical bands, which the plot is doing a good job of illustrating.
SaiDileep Kola
el 29 de Jul. de 2019
Provide the data set and describe your expected figure.
Respuestas (1)
Cong Dong Ngoc Minh
el 15 de Oct. de 2021
0 votos
From my perspective, Latitude and Longitude should be converted from degree to radians first, after that using the sph2cart function to transfor to cartesian coordinate (x,y,z).
Categorías
Más información sobre Earth and Planetary Science en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!