The integer data sructures such as int8 or int16 has NaN values?
Show older comments
The integer data sructures such as int8 or int16 has NaN values?
Accepted Answer
More Answers (1)
Azzi Abdelmalek
on 29 May 2016
you can use cell array for that
a=[1 2 nan 3]
idx=isnan(a);
b=num2cell(uint8(a))
b(idx)={nan}
Now you can check the class of each element
s=b{1}
whos s
g=b{2}
whos g
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!