Hi MATLAB community,
I wrote a code for identify 999999 to substitute to NaN, my purpose is replace NaN to mean of column data,
I tried follow code:
[l,c]=size(matrix)
for w=1:c
for q = 1:l
if matrix(q,w)==999999
matrix(q,w) =NaN;
matrix(isnan(matrix))= mean(matrix(:,w),'omitnan');
end
end
end
Could help me?
Grateful
1 Comment
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/465706-error-using-omitnan#comment_711932
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/465706-error-using-omitnan#comment_711932
Sign in to comment.