Why do the MIN and MAX functions not ignore NaN values inside a matrix of single precision values within MATLAB 6.5 (R13)?
Show older comments
Why do the MIN and MAX functions not ignore NaN values inside a matrix of single precision values within MATLAB 6.5 (R13)?
The help files for the MIN and MAX functions state that NaN values are ignored. This is not actually the case for vectors of single precision values.
To reproduce this behavior:
a = [8 6 10 NaN 2 4 3];
b = single(a);
min(b),max(b)
This produces the results:
ans =
NaN
ans =
NaN
Accepted Answer
More Answers (0)
Categories
Find more on Logical in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!