- Main Page
- Tutorials
- Functions
- Release Notes
- Examples

Functions
upper
Complete List of ArrayFire Functions ArrayFire Functions by Category » Functions to create and modify Arrays » | Functions to create arrays.

Create a upper triangular marix from input array. More...

## Functions
AFAPI array | upper (const array &in, bool is_unit_diag=false)
AFAPI af_err | af_upper (af_array *out, const af_array in, bool is_unit_diag)

## Detailed Description

Create a upper triangular marix from input array.

=======================================================================

## Function Documentation

AFAPI af_err af_upper | ( | af_array * | out,
|  | const af_array | in,
|  | bool | is_unit_diag
| ) |  |

Parameters

  [out] | out | is the upper triangle matrix
  [in] | in | is the input matrix
  [in] | is_unit_diag | is a boolean parameter specifying if the diagonal elements should be 1

AFAPI array af::upper | ( | const array & | in,
|  | bool | is_unit_diag = `false`
| ) |  |

Parameters

  [in] | in | is the input matrix
  [in] | is_unit_diag | is a boolean parameter specifying if the diagonal elements should be 1

Returns
  the upper triangle matrix

Examples:
  lu.cpp.