undefined function 'isnan' for input arguments of type 'table'
Show older comments
Hi guys,
I have data from a table which looks as below.
y=data(:,20);
X=data(:,[17:19,21:29]);
I am trying to remove some NaN values in data using isnan.
nans = isnan(y) | (sum(isnan(X), 2) > 0);
But, I keep getting error.
undefined function 'isnan' for input arguments of type 'table'
Could somebody please help me?
Accepted Answer
More Answers (1)
dpb
on 3 Sep 2019
Presuming the variables in data are named y and X, then
nans = isnan(data.y) | (sum(isnan(data.X), 2) > 0);
You have to select the data itself, not the whole table or subsets thereof.
Categories
Find more on Data Type Conversion 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!