# Documentation

### This is machine translation

Translated by
Mouseover text to see original. Click the button below to return to the English verison of the page.

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

# `curl`

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.

## Syntax

```curl(`v`, `x`)
curl(`v`, `x`, `ogCoord`, <`c`>)
```

## Description

`curl(v, x)` computes the curl of the three-dimensional vector field with respect to the three-dimensional 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 three-dimensional 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``()`.

## Examples

### Example 1

Compute the curl of the vector field in Cartesian coordinates:

```delete x, y, z: curl([x*y, 2*y, z], [x, y, z])```

### Example 2

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`.

### Example 3

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)`

## Parameters

 `v` A list of three arithmetical expressions, or a three-dimensional vector (a 3×1 or 1 ×3 matrix of a domain of category `Cat::Matrix`) `x` A list of three (indexed) identifiers `ogCoord` The name of a three-dimensional orthogonal coordinate system predefined in the table `linalg::ogCoordTab`, or a list of algebraic expressions representing the scale factors of an orthogonal coordinate system. `c` The parameter of the coordinate systems EllipticCylindrical and Torus, respectively: an arithmetical expression. The default value is `c` = 1.

Column vector.