aeq

Functions

int main(int argc, char *argv[])

aeq [ option ] exfile [ infile ]

  • -t double

    • absolute tolerance \((0 \le \epsilon)\)

  • -e int

    • error type

      • 0 absolute error

      • 1 relative error

  • -L

    • disable to check length

  • exfile str

    • double-type expected values

  • infile str

    • double-type actual values

  • stdout

    • result messages

This command checks whether two data sequences are almost equal or not.

Given the two data sequences

\[\begin{split} \begin{array}{cccc} x_1(0), & x_1(1), & \ldots, & x_1(T_1), \\ x_2(0), & x_2(1), & \ldots, & x_2(T_2), \\ \end{array} \end{split}\]
the absolute error \(e(t)\) is calculated sample-by-sample:
\[ e(t) = | x_1(t) - x_2(t) |. \]
If \(e(t)\) is greater than tolerance \(\epsilon\) or \(T_1\) is not equal to \(T_2\), the command prints a warning message.

The below example checks the equality between two data:

aeq -t 0 data.x1 data.x2
Parameters:
  • argc[in] Number of arguments.

  • argv[in] Argument vector.

Return values:
  • -1 – Given two data sequences are not almost equal.

  • 0 – Given two data sequences are almost equal.

  • 1 – Failed to run this command.