BasisFormat - Maple Help

Home : Support : Online Help : Mathematics : Vector Calculus : VectorCalculus/BasisFormat

VectorCalculus

 BasisFormat
 query or set Vector display style

 Calling Sequence BasisFormat(fmt)

Parameters

 fmt - (optional) truefalse; specify display style

Description

 • By default, free Vectors and vector fields created by commands in the VectorCalculus package are displayed using basis format, that is, as a sum of scalar multiples of basis vectors.  Basis vectors are displayed by using the letter "e" subscripted by a coordinate name. If the Vector displayed is a vector field, the basis vectors display with an overbar.
 • The BasisFormat(fmt) calling sequence determines whether basis format style is used.  If fmt is true, free Vectors and vector fields are displayed using basis format.  If fmt is false, free Vectors and vector fields are displayed using standard Vector notation.
 • Position Vectors, being Vectors that are always in cartesian coordinates rooted at the origin, are always displayed in standard Vector notation. The BasisFormat(fmt) calling sequence has no effect on the display of a position Vector.
 • Similarly, rooted Vectors are always displayed in standard Vector notation, independent of the BasisFormat setting.
 Note: In standard Vector notation, there is no visual distinction between vector fields and the other Vectors.
 • The BasisFormat command returns the basis format setting in effect when the command was invoked, not the new setting.

Examples

 > $\mathrm{with}\left(\mathrm{VectorCalculus}\right):$

The default notation is basis format for free Vectors and vector fields.

 > $\mathrm{BasisFormat}\left(\right)$
 ${\mathrm{true}}$ (1)
 > $\mathrm{SetCoordinates}\left(\mathrm{polar}\left[r,\mathrm{\theta }\right]\right)$
 ${{\mathrm{polar}}}_{{r}{,}{\mathrm{\theta }}}$ (2)
 > $\mathrm{fv}≔⟨2,3⟩$
 ${\mathrm{fv}}{≔}\left({2}\right){{e}}_{{r}}{+}\left({3}\right){{e}}_{{\mathrm{θ}}}$ (3)
 > $\mathrm{rv}≔\mathrm{RootedVector}\left(\mathrm{root}=\left[1,\mathrm{\pi }\right],\left[2,\frac{\mathrm{\pi }}{2}\right]\right)$
 ${\mathrm{rv}}{≔}\left[\begin{array}{c}{2}\\ \frac{{\mathrm{\pi }}}{{2}}\end{array}\right]$ (4)
 > $\mathrm{vf}≔\mathrm{VectorField}\left(⟨{r}^{2},\frac{1}{\mathrm{\theta }}⟩\right)$
 ${\mathrm{vf}}{≔}\left({{r}}^{{2}}\right){\stackrel{{_}}{{e}}}_{{r}}{+}\left(\frac{{1}}{{\mathrm{\theta }}}\right){\stackrel{{_}}{{e}}}_{{\mathrm{θ}}}$ (5)
 > $\mathrm{pv}≔\mathrm{PositionVector}\left(\left[1,\mathrm{\theta }\right]\right)$
 ${\mathrm{pv}}{≔}\left[\begin{array}{c}{\mathrm{cos}}{}\left({\mathrm{\theta }}\right)\\ {\mathrm{sin}}{}\left({\mathrm{\theta }}\right)\end{array}\right]$ (6)

To use standard Vector notation, set BasisFormat to false. This will not affect the display of position Vectors or rooted Vectors.

 > $\mathrm{BasisFormat}\left(\mathrm{false}\right)$
 ${\mathrm{true}}$ (7)
 > $\mathrm{fv}$
 $\left[\begin{array}{c}{2}\\ {3}\end{array}\right]$ (8)
 > $\mathrm{rv}$
 $\left[\begin{array}{c}{2}\\ \frac{{\mathrm{\pi }}}{{2}}\end{array}\right]$ (9)
 > $\mathrm{vf}$
 $\left[\begin{array}{c}{{r}}^{{2}}\\ \frac{{1}}{{\mathrm{\theta }}}\end{array}\right]$ (10)
 > $\mathrm{pv}$
 $\left[\begin{array}{c}{\mathrm{cos}}{}\left({\mathrm{\theta }}\right)\\ {\mathrm{sin}}{}\left({\mathrm{\theta }}\right)\end{array}\right]$ (11)