Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X
To whoever may be interested
Mathcad 11:
PrimeExpress4 (with a correct implementation of the filterNaN function):
Luc
PrimeExpress4 (with a correct implementation of the filterNaN function):
🙂
The built-in filterNaN in Prime4 throws the same error as in P9.
Actually the bug is already present in Mathcad 15 😞
In that case we know who to blame: PTC was responsible for Mathcad 15 and all versions of Prime.
I'm responsible for the implementation of the filterNaN function in the PrimeExpress library.
Note that it has this peculiarity:
(It doesn't do vectors, yet)
I now see how to mend that (the dirty way)
Luc
@LucMeekes wrote:
In that case we know who to blame: PTC was responsible for Mathcad 15 and all versions of Prime.
Not that I have any inhibitions about accusing PTC of screwing up, but we can't be entirely sure in this case. We would have to test it in an early 14 version of Mathcad, where Mathsoft still was responsible.
BTW, my guess is that filterNaN somehow uses the vector of row numbers of ALL NaN's in the matrix to finally trim it. After all the help describes filterNaN as a combination of matchNaN and trim (which, without additional modifications, is true for vectors only)
If the number of NaN's in the matrix is larger than the number of rows of the matrix, the error is thrown. Of course this is silly as the trim-vector would include some row numbers multiple times and therefore its OK if its larger.
Consequently the "trim" command suffers from a similar problem:
Luc's version of "trim" from his excellent Express-collection does not suffer from this bug.