AssertEqualsNumericalMatrix
From ApCoCoAWiki
Revision as of 13:58, 28 November 2011 by Chruse Arroyo (talk | contribs)
AssertEqualsNumericalMatrix
Compares two numerical matrices.
Syntax
$apcocoa/ts/assert.AssertEqualsNumericalMatrix(Result: MAT, Expected: MAT, Eps: RAT, ErrMsg: STRING)
Description
This function compares two numerical matrices. Uses AssertEqualsNumericalNumber for every entry of the matrix 'Result' and its corresponding entry in 'Expected'. If the matrices are numerically not the same it throws an error and prints the error message 'ErrMsg'.
@param Result: The numerical matrix
@param Expected: The expected numerical matrix
@param Eps: Epsilon
@param ErrMsg: Error message
Example
M:=Mat([[0.99,0.02],[0.00,0.98]]); N:=Mat([[1,0],[0,1]]); $apcocoa/ts/assert.AssertTrue(M, N, 0.1, "Result matrix is numerically not equal to the expected matrix.");