Reputation:
I have following problem:
I want to:
No idea how to do that... For deleting the columns with NaN I used
CompanyDataTimeWindow = estPer3(:,isfinite(sum(estPer3)))
However I have no idea how to delete corresponding column in B
Upvotes: 2
Views: 2494
Reputation: 29064
[rows, cols] = find(isnan(A));
A(:,unique(cols)) = [];
B(:,unique(cols)) = [];
Upvotes: 1
Reputation: 2332
This should work:
NaNCols = any(isnan(A));
A = A(:,~NaNCols)
B = B(:,~NanCols)
Upvotes: 4