# skewdec

Form skew-symmetric matrix

## Syntax

```X = skewdec(m,n) ```

## Description

`X = skewdec(m,n)` forms the m-by-m skew-symmetric matrix

`$\left[\begin{array}{cccc}0& -\left(n+1\right)& -\left(n+2\right)& \dots \\ \left(n+1\right)& 0& -\left(n+3\right)& \dots \\ \left(n+2\right)& \left(n+3\right)& 0& \dots \\ \dots & \dots & \dots & \dots \\ \dots & \dots & \dots & \dots \end{array}\right]$`

This function is useful to define skew-symmetric matrix variables. In this case, set `n` to the number of decision variables already used.

## Examples

collapse all

Create a 3-by-3 skew-symmetric matrix for an LMI problem in which n = 2. Display the matrix to verify its form.

`X = skewdec(3,2)`
```X = 3×3 0 -3 -4 3 0 -5 4 5 0 ```

## Version History

Introduced before R2006a