SetCoordinates - Maple Help

Student[VectorCalculus]

 SetCoordinates
 set the coordinate attribute on a Vector

 Calling Sequence SetCoordinates(v, c)

Parameters

 v - (optional) free or position Vector c - name or name[name, name, ...]; specify the coordinate system, possibly indexed by the coordinate names

Description

 • The SetCoordinates(v, c) calling sequence sets the coordinate attribute on the Vector v.
 Important: The SetCoordinates command does not convert a Vector to a new coordinate system. It simply changes the coordinate system attribute. To convert a Vector to a new coordinate system, use the MapToBasis command.
 • The SetCoordinates(c) calling sequence sets the default coordinate system to c.
 If c is given only as a name, default coordinate names are used for the display (only) of Vectors.
 To be able to create a vector field using the default coordinate system, you must provide names for the coordinates in the index to the coordinate system specification c of the SetCoordinates call. See the Examples section.
 • The coordinate systems recognized by the Student[VectorCalculus] package are described in Coordinates.

Examples

 > $\mathrm{with}\left(\mathrm{Student}\left[\mathrm{VectorCalculus}\right]\right):$
 > $\mathrm{SetCoordinates}\left(\mathrm{cartesian}\left[x,y\right]\right)$
 ${{\mathrm{cartesian}}}_{{x}{,}{y}}$ (1)
 > $v≔⟨a,b⟩$
 ${v}{≔}\left({a}\right){{e}}_{{x}}{+}\left({b}\right){{e}}_{{y}}$ (2)
 > $\mathrm{SetCoordinates}\left(v,\mathrm{polar}\right)$
 $\left({a}\right){{e}}_{{r}}{+}\left({b}\right){{e}}_{{\mathrm{θ}}}$ (3)
 > $\mathrm{GetCoordinates}\left(v\right)$
 ${{\mathrm{polar}}}_{{r}{,}{\mathrm{\theta }}}$ (4)

If you create a vector field and do not specify a coordinate system with coordinate names, default coordinate names for that system are generated.

 > $\mathrm{SetCoordinates}\left(\mathrm{spherical}\right)$
 ${{\mathrm{spherical}}}_{{r}{,}{\mathrm{\phi }}{,}{\mathrm{\theta }}}$ (5)
 > $v≔\mathrm{VectorField}\left(⟨r,0,0⟩\right)$
 ${v}{≔}\left({r}\right){\stackrel{{_}}{{e}}}_{{r}}{+}\left({0}\right){\stackrel{{_}}{{e}}}_{{\mathrm{φ}}}{+}\left({0}\right){\stackrel{{_}}{{e}}}_{{\mathrm{θ}}}$ (6)
 > $\mathrm{SetCoordinates}\left(\mathrm{spherical}\left[r,\mathrm{\phi },\mathrm{\theta }\right]\right)$
 ${{\mathrm{spherical}}}_{{r}{,}{\mathrm{\phi }}{,}{\mathrm{\theta }}}$ (7)
 > $v≔\mathrm{VectorField}\left(⟨r,0,0⟩\right)$
 ${v}{≔}\left({r}\right){\stackrel{{_}}{{e}}}_{{r}}{+}\left({0}\right){\stackrel{{_}}{{e}}}_{{\mathrm{φ}}}{+}\left({0}\right){\stackrel{{_}}{{e}}}_{{\mathrm{θ}}}$ (8)
 > $\mathrm{GetCoordinates}\left(v\right)$
 ${{\mathrm{spherical}}}_{{r}{,}{\mathrm{\phi }}{,}{\mathrm{\theta }}}$ (9)