Scilab Home page | Wiki | Bug tracker | Forge | Mailing list archives | ATOMS | File exchange
Scilab-Branch-6.1-GIT
Change language to: Français - Português - 日本語 - Русский
Scilab Help >> Polynomials > lcmdiag

# lcmdiag

least common multiple diagonal factorization

### Syntax

```[N,D] = lcmdiag(H)
[N,D] = lcmdiag(H, 'row')
[N,D] = lcmdiag(H, 'col')```

### Arguments

H

rational matrix

N

polynomial matrix

D

diagonal polynomial matrix

'row'|'col'

character string: Default is `'col'`.

### Description

`[N,D]=lcmdiag(H,'row')` computes a factorization `D*H=N`, i.e. `H=D^(-1)*N` where D is a diagonal matrix with D(k,k)=lcm of kth row of H('den').

`[N,D]=lcmdiag(H)` or `[N,D]=lcmdiag(H,'col)` returns `H=N*D^(-1)` with diagonal D and D(k,k)=lcm of kth col of H('den')

### Examples

```s = poly(0,'s');
H = [1/s,(s+2)/s/(s+1)^2;1/(s^2*(s+2)),2/(s+2)];
[N,D] = lcmdiag(H);
N/D - H```

• lcm — least common (positive) multiple of integers or of polynomials
• gcd — Greatest (positive) Common Divisor
• bezout — GCD of two polynomials or two integers, by the Bezout method