X(any(isnan(X),2),:) = [];
>> X = [ 1 2 3; 3 4 5; NaN 3 NaN]
X =
1 2 3
3 4 5
NaN 3 NaN
>> X(any(isnan(X),2),:) = []
X =
1 2 3
3 4 5
One can make a function for it also
function X = exciseRows(X)
X(any(isnan(X),2),:) = [];
>> X = [ 1 2 3; 3 4 5; NaN 3 NaN]
X =
1 2 3
3 4 5
NaN 3 NaN
>> X(any(isnan(X),2),:) = []
X =
1 2 3
3 4 5
One can make a function for it also
function X = exciseRows(X)
X(any(isnan(X),2),:) = [];
No comments:
Post a Comment