Created
September 13, 2016 13:16
-
-
Save sandyUni/108ce2347c4446595c0927bb00b097e6 to your computer and use it in GitHub Desktop.
convert polar coordinate to Cartesian
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function [X,Y,Z] = polarToCartesian(R,logi,lanti) | |
% convert polar coordinate to Cartesian | |
% R, logi(-pi~pi), lanti (-1/2*pi~1/2*pi) are Radius,longitude, lantitude | |
Z = R* sin(lanti); | |
Y = R* cos(lanti) *sin(logi); | |
X = R*cos(lanti) *cos(logi); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment