lat long radius to XYZ

조회 수: 9 (최근 30일)
Ahmed Abdulla
Ahmed Abdulla 2019년 7월 19일
답변: Cong Dong Ngoc Minh 2021년 10월 15일
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 XYZ plot.PNG
lat_long_height.png
  댓글 수: 3
David Goodmanson
David Goodmanson 2019년 7월 19일
편집: David Goodmanson 2019년 7월 19일
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
SaiDileep Kola 2019년 7월 29일
Provide the data set and describe your expected figure.

댓글을 달려면 로그인하십시오.

답변 (1개)

Cong Dong Ngoc Minh
Cong Dong Ngoc Minh 2021년 10월 15일
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).

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by