Difference between revisions of "Xyz2sph.m"

From Spinach Documentation Wiki
Jump to: navigation, search
(Normalise sequential blank lines)
m (Spot-edit Spinach function page first-line NOTOC and template fields)
Line 1: Line 1:
−
{{DISPLAYTITLE:xyz2sph.m}}
+
{{DISPLAYTITLE:xyz2sph.m}} __NOTOC__
 
Converts Cartesian coordinates [x y z] into spherical coordinates according to the ISO convention.
 
Converts Cartesian coordinates [x y z] into spherical coordinates according to the ISO convention.
  

Revision as of 18:30, 5 June 2026

Converts Cartesian coordinates [x y z] into spherical coordinates according to the ISO convention.

Syntax

    [r,theta,phi] = xyz2sph(x,y,z)

Arguments

    x,y,z  - arrays of X, Y and Z coordinates

Outputs

    r      - array of radii

    theta  - array of inclinations

    phi    - array of azimuth values

See also

euler2dcm.m, wigner.m

Version 2.1, authors: Ilya Kuprov, Elizaveta Suturina