dash.assert.positiveDiagonals

Throw error if diagonals of matrices along the third dimension are not positive


Syntax



Description

dash.assert.positiveDiagonals(X)

Given a numeric 3D array, checks that the diagonals of each matrix along the third dimension are positive. Also allows NaN elements along the diagonals. Throws an error if not. The method assumes that the input matrices are covariance matrices, so thrown error messages will refer to the matrices as covariances.

dash.assert.positiveDiagonals(X, name, header)

Customize error messages and IDs


Input Arguments

X

numeric 3*D* array
The input being checked

name

string scalar
The name of the input