Difference between revisions of "TestNumMatrix"

From ApCoCoAWiki
m (New page: <command> <title>TestNumMatrix</title> <short_description>Compares two matrizes with numerical entries</short_description> <syntax> ApCoCoATest.TestNumMatrix(f: MAT, e: MAT, Eps: RAT):LIST...)
 
m
 
Line 17: Line 17:
  
 
<example>
 
<example>
 +
Mat1 := Mat([[2.3,2.1],[2.01,3.1]]); Mat2 := Mat([[2.31,2.09],[1.99,3.01]]);
 +
ApCoCoATest.TestNumMatrix(Mat1,Mat2, 0.1);
  
 +
[TRUE]
 +
-------------------------------
 
</example>
 
</example>
  

Latest revision as of 17:57, 12 October 2009

TestNumMatrix

Compares two matrizes with numerical entries

Syntax

ApCoCoATest.TestNumMatrix(f: MAT, e: MAT, Eps: RAT):LIST

Description

This function compares two matrizes with numerical entries. Every entry is compared via the function TestNumericalNumber.

  • @param Found: The first matrix

  • @param Expected: The second matrix

  • @param Eps: The allowed difference between two entries

  • @return A list. First entry is a boolean, its value is TRUE, if the test has been passed. If FALSE, the list contains also the two matrizes.

Example

Mat1 := Mat([[2.3,2.1],[2.01,3.1]]); Mat2 := Mat([[2.31,2.09],[1.99,3.01]]);
ApCoCoATest.TestNumMatrix(Mat1,Mat2, 0.1);

[TRUE]
-------------------------------