Extracts the upper triangular matrix. More...

array diag (const array &input)
 Extract or form diagonal matrix. More...
 

Detailed Description

Extracts the upper triangular matrix.

Returns the upper triangular matrix

Function Documentation

array af::diag ( const array &  input)

Extract or form diagonal matrix.

Parameters
[in]inputif vector then produce diagonal matrix, if matrix then extract diagonal vector
Returns
diagonal matrix formed from vector, or vector extracted from diagonal of a matrix