Download Help (Windows Only) |

**Owning Class: **linalgebra

**Requires: **MathScript RT Module

x = gsvd(A, B)

[U, V, R, C, S] = gsvd(A, B)

[U, V, R, C, S] = gsvd(A, B, 0)

Performs generalized singular value decomposition (SVD) of a matrix pair.

Name | Description |
---|---|

A |
Specifies a matrix. |

B |
Specifies a matrix. A and B must have the same number of columns. |

0 |
Directs LabVIEW to perform generalized SVD in the economy size format. |

Name | Description |
---|---|

x |
Returns the generalized singular values. x is a vector. |

U |
Returns an orthogonal matrix of the generalized SVD. |

V |
Returns an orthogonal matrix of the generalized SVD. |

R |
Returns a square matrix of the generalized SVD. |

C |
Returns a diagonal matrix of the generalized SVD. |

S |
Returns a diagonal matrix of the generalized SVD. |

The following equations define the generalized singular value decomposition of a matrix pair (**A**, **B**):**A** = **UCR**'**B** = **VSR**'

where **U** and **V** are orthogonal matrices, and **R** is a square matrix.

Let *k* be the rank of the matrix [**A**; **B**]. Then the first *k* diagonal elements of matrix **C**'**C** + **S**'**S** are ones and all other elements are zeros. The square roots of the first *k* diagonal elements of **C**'**C** and **S**'**S** determine the numerators and denominators, respectively, of the generalized singular values.

If **A** is an *m*-by-*p* matrix, and **B** is an *n*-by-*p* matrix, then [U, V, R, C, S] = gsvd(A, B) returns **U** as an *m*-by-*m* matrix, **V** as an *n*-by-*n* matrix, **R** as a *p*-by-*p* matrix, **C** as an *m*-by-*p* matrix, and **S** as an *n*-by-*p* matrix. If you specify **0**, LabVIEW performs generalized SVD in the economy size format. In other words, [U, V, R, C, S] = gsvd(A, B, 0) returns **U** as an *m*-by-min(*m*, *p*) matrix, **V** as an *n*-by-min(*n*, *p*) matrix, **R** as a *p*-by-*p* matrix, **C** as a min(*m*, *p*)-by-*p* matrix, and **S** as a min(*n*, *p*)-by-*p* matrix.

The following table lists the support characteristics of this function.

Supported in the LabVIEW Run-Time Engine | Yes |

Supported on RT targets | Yes |

Suitable for bounded execution times on RT | Not characterized |

A = reshapemx(1:12, 4, 3);

B = magic(3);

X = gsvd(A, B)