# quatconj

Calculate conjugate of quaternion

## Syntax

``n = quatconj(q)``

## Description

example

````n = quatconj(q)` calculates the conjugate `n` for a given quaternion, `q`. For more information on the quaternion and quaternion conjugate forms, see Algorithms.Aerospace Toolbox uses quaternions that are defined using the scalar-first convention.```

## Examples

collapse all

Determine the conjugate of q = [1 0 1 0].

`conj = quatconj([1 0 1 0])`
```conj = 1×4 1 0 -1 0 ```

## Input Arguments

collapse all

Quaternion matrix, specified in an m-by-4 matrix of real numbers containing m quaternions.

Example: `[1 0 1 0]`

Data Types: `double`

## Output Arguments

collapse all

Conjugate matrix, returned in an m-by-4 matrix.

## Algorithms

The quaternion has the form of

`$q={q}_{0}+i{q}_{1}+j{q}_{2}+k{q}_{3}.$`

The quaternion conjugate has the form of

`${q}^{\prime }={q}_{0}-i{q}_{1}-j{q}_{2}-k{q}_{3}.$`

 Stevens, Brian L. and Frank L. Lewis. Aircraft Control and Simulation. 2nd ed. Wiley–Interscience, 2003.