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

# `ode`::`cyclicVector`

Transforms a linear differential system to an equivalent linear differential system with a companion matrix.

MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.

## Syntax

```ode::cyclicVector(`A`, `x`, <`v`>)
```

## Description

`ode::cyclicVector(A, x, v)` converts a first order homogeneous differential system into a corresponding first order homogeneous differential system , where `B` is a companion matrix, by substituting Z = PY using the potential cyclic vector `v`. If `v` is not cyclic then an empty list is returned otherwise a list is returned whose first element is a list corresponding to the last row of `B` and second element is the invertible matrix `P`.

When the optional argument `v` is not given then the vector `[1,0,...,0]` is tested. If it is not cyclic then a suitable one is determined randomly by the procedure.

## Examples

### Example 1

We compute a differential system equivalent to the following differential system:

`A := matrix( [ [x^2-1,1,0], [0,x^2+5*x+1/3,1], [0,0,2]])`

`ode::cyclicVector(A, x)`

So `[1,0,0]` is a cyclic vector; `[x,0,0]` is also a cyclic vector:

`l := ode::cyclicVector(A, x, [x,0,0])`

And we can build easily a linear homogeneous differential equation associated to it (c.f. `ode::mkODE`):

`-ode::mkODE(l[1].[-1], y, x)`

## Parameters

 `A` A square matrix of type `Dom::Matrix`. `x` The independent variable. `v` A list of size the dimension of `A`, default is `[1,0,...,0]`.

## Return Values

List, possibly empty, of two lists.