dash.assert.covariances
Throw error if matrices along the third dimension are not covariances
Syntax
Description
dash.assert.covariances(X)
Given a numeric 3D array, checks that each matrix along the third dimension is a valid covariance matrix. Covariance matrices must be symmetric with positive diagonals (variances). NaN elements are allowed as long as they are distributed symmetrically. Uses a -999 placeholder to allow symmetric comparison of NaN elements. NaN elements are also allowed along the diagonals. If the matrices do not meet these criteria, throws an error.
Customize error messages and IDs.
Input Arguments
X
numeric 3*D* array
The input being checked
name
string scalar
The name of the input
header
string scalar
Header for thrown error IDs.