DIPlib Documentation - ©1995-2015 Quantitative Imaging Group, Delft University of Technology.

# SingularValueDecomposition

Singular value decomposition

## SYNOPSIS

dip_Error dip_SingularValueDecomposition ( in, sz, u, s, v )

## DATA TYPES

float

## FUNCTION

Computes the SVD of the ImageArray `in`, such that `in` = `u` * `s` * transpose(`v`), with `s` being diagonal. The size of the `in` matrix is passed to the function via the integer array `sz`. If the input is of size MxN, then the outputs must be `u`: nxM, `s`: NxN, and `v`: NxN.

Optionally, set `u` and `v` to `NULL`, and let `s` have N elements, it will contain only the singular values.

## ARGUMENTS

Data type | Name | Description
`dip_ImageArray` | `in` | Input
`dip_IntegerArray` | `sz` | Matrix size of Input
`dip_ImageArray` | `u` | Output
`dip_ImageArray` | `s` | Output
`dip_ImageArray` | `v` | Output