Difference between revisions of "AssertEqualsNumericalMatrix"

From ApCoCoAWiki
Line 25: Line 25:
 
<key>Assert</key>
 
<key>Assert</key>
 
</command>
 
</command>
 +
[http://essay-writer.org/ dissertation writers]

Revision as of 13:58, 28 November 2011

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.");



dissertation writers