On Sun, 12 Jan 2020, Ioannis Venetis wrote:
Hi all,
In 2020a-git build date 2020-01-1 (i haven't test in other versions)
Function isnan() returns -1 instead of 1 as the help says "... Given a
matrix argument, returns a matrix of the same dimensions with 1s in
positions where the corresponding element of the input is NaN and 0s
elsewhere"
Ah, that occurs only on Windows. I hadn't noticed, but the C99
standard just says "The isnan macro returns a nonzero value if and
only if its argument has a NaN value." Microsoft has helpfully
chosen to return -1 rather than 1. So there's now a workaround for
MS behavior in git.
Also shouldn't it be in the help "...of the input is NA and
0s
elsewhere" [...]
Actually, no: isnan() is literally a test for NaN.
Allin