VectorCalculus
MapToBasis
convert Vectors and vector fields between different coordinate systems
Calling Sequence
Parameters
Description
Examples
MapToBasis(V,c,p)
V
-
Vector(algebraic) or Vector valued procedure; specify the free Vector, rooted Vector of vector field to be converted
c
(optional) name or name[name, name, ...]; specify the target coordinate system.
p
(optional) list or Vector(algebraic); specify the target root point.
The MapToBasis(V, c) command converts Vectors and vector fields between different coordinate systems.
If V is a Vector valued procedure, it is interpreted as a vector field. Otherwise, a vector field is a Vector created by a call to the VectorField routine.
If c is not specified, the current coordinate system is used. If V represents a vector field, the implied coordinates must be indexed with the names of the new coordinates. Otherwise, an error is raised. If V represents a Vector, no coordinate names are required.
If a coordinate system attribute is specified on V, V is interpreted in this coordinate system. Otherwise, the object is interpreted as a Vector or vector field in the current coordinate system. If the two are not compatible, an error is raised.
If p is specified and v is a free Vector in Cartesian coordinates, the result will be a rooted Vector with a root point p. If p is a list, it will be interpreted as Cartesian coordinates.
with⁡VectorCalculus:
MapToBasis with free Vectors
GetCoordinates⁡
cartesian
v1≔MapToBasis⁡1,1,polar
MapToBasis⁡v1,cartesian
v2≔r,θ
SetCoordinates⁡v2,polar
MapToBasis⁡v2
Using MapToBasis with free Vectors to get a rooted Vector
v3≔MapToBasis⁡a,b,polar,0,1
v3≔b−a
About⁡v3
Type: Rooted VectorComponents: b,−aCoordinates: polarRoot Point: 1,π2
SetCoordinates⁡sphericalr,φ,θ
sphericalr,φ,θ
MapToBasis with vector fields
VF≔VectorField⁡r,0,0
MapToBasis⁡VF,cartesianx,y,z
MapToBasis with Vector-valued procedures
MapToBasis⁡r,φ,θ↦1r2,0,0,cartesianx,y,z
See Also
coords
VectorCalculus[GetCoordinates]
VectorCalculus[PositionVector]
VectorCalculus[RootedVector]
VectorCalculus[SetCoordinates]
VectorCalculus[Vector]
VectorCalculus[VectorField]
Download Help Document