Why delete columns whose output value is NaN not correct?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
jenifer Ask
am 31 Dez. 2019
Beantwortet: Walter Roberson
am 31 Dez. 2019
Why delete columns whose output value is NaN not correct?
Why delete columns whose output value is NaN not correct?
2400*10350
(2400 images) (10350 features)
clear all
load ('Vactor1-100')
A=FeatureVector;
Out1 = A(:,~any(isnan(A),1));
my output is [] WHY?
2 Kommentare
Vladimir Sovkov
am 31 Dez. 2019
Probably, all the columns of your matrix contain at least one NaN each...
Akzeptierte Antwort
Walter Roberson
am 31 Dez. 2019
1)
Out1 = A(~any(isnan(A),2), :);
2)
Out1 = fillmissing(A, 'constant', 0);
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu NaNs finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!