PO_matlab
mycart2sphvec.m File Reference

Converts a vector field from Cartesian to spherical coordinates. More...

Functions

function mycart2sphvec (in Ax, in Ay, in Az, in theta, in phi)

Detailed Description

Converts a vector field from Cartesian to spherical coordinates.

This function transforms the vector components (Ax, Ay, Az) in Cartesian coordinates into their corresponding spherical components (Ar, Atheta, Aphi) based on the provided angular coordinates.

Parameters
AxX-component of the vector field
AyY-component of the vector field
AzZ-component of the vector field
thetaElevation angle(s) [rad]
phiAzimuth angle(s) [rad]
Return values
ArRadial component of the vector field
AthetaElevation (theta) component of the vector field
AphiAzimuthal (phi) component of the vector field

Function Documentation

◆ mycart2sphvec()

function mycart2sphvec ( in Ax,
in Ay,
in Az,
in theta,
in phi )