Curl of a vector field
MuPAD® notebooks are not recommended. Use MATLAB® live scripts instead.
MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.
curl(v
,x
) curl(v
,x
,ogCoord
, <c
>)
curl(v, x)
computes the curl of the threedimensional
vector field
with
respect to the threedimensional vector
in
Cartesian coordinates. This is the vector field
.
curl(v, x, ogCoord)
computes the curl of v
with
respect to x
in the orthogonally curvilinear coordinate
system specified by ogCoord
.
ogCoord
can be the name of a threedimensional
orthogonal coordinate system predefined in the table linalg::ogCoordTab
.
See Example 2.
Alternatively, ogCoord
can be a list of vector
of algebraic expressions representing the scale factors of the coordinate
system. See example Example 3. For
details, see the description of the Scales
option
on the linalg::ogCoordTab
page.
If v
is a vector then the component ring
of v
must be a field (a domain of category Cat::Field
) for which differentiation
with respect to x
is defined.
curl
returns a vector of the domain Dom::Matrix
()
.
Compute the curl of the vector field in Cartesian coordinates:
delete x, y, z: curl([x*y, 2*y, z], [x, y, z])
Compute the curl of the vector field , (0 ≤ ϕ < 2 π) in cylindrical coordinates:
delete r, phi, z: V := matrix([r, cos(phi), z]):
curl(V, [r, phi, z], Cylindrical)
The following relations between Cartesian and cylindrical coordinates hold:
.
Other predefined orthogonal coordinate systems can be found
in the table linalg::ogCoordTab
.
Compute the curl of a vector field in spherical coordinates r, θ,ϕ given by
with 0 ≤ θ ≤ π, 0 ≤ ϕ < 2 π. The vectors
form an orthogonal system of unit vectors corresponding to the
spherical coordinates. The scaling factors of the coordinate transformation
(see linalg::ogCoordTab
)
are
,
,
,
which we use in the following example to compute the curl of the vector
field
=
:
delete r, Theta, phi: curl([0, 0, r^2], [r, Theta, phi], [1, r, r*sin(Theta)])
These are the coefficients of the curl of in the bases given by the vectors , , , that is, the curl of is given by the vector field .
The spherical coordinates are already defined in linalg::ogCoordTab
.
The last result can also be achieved with the input curl([0,
0, r^2], [r, Theta, phi], Spherical)
.
curl([0, 0, r^2], [r, Theta, phi], Spherical)

A list of three arithmetical expressions, or a threedimensional
vector (a 3×1 or 1
×3 matrix of a domain of category 

A list of three (indexed) identifiers 

The name of a threedimensional orthogonal coordinate system
predefined in the table 

The parameter of the coordinate systems EllipticCylindrical and Torus, respectively: an arithmetical expression.
The default value is 
Column vector.