Reputation: 389
I have an m x n matrix. I would like to get a logical 1 x n vector where 'True' in the 4'th element indicates that the 4'th column was all NaN elements. What is the fastest way to accomplish that?
m x n
1 x n
NaN
Upvotes: 0
Views: 47
Reputation: 1439
This should do nancols = all(isnan(A), 1)
nancols = all(isnan(A), 1)
Upvotes: 4