I have a table A with several columns (A1, A2, A3, A4… A33). I want to check Nan values in column A5, then replace them with the value in corresponding row in column A8.
Following is my code, but it does not seem to work correctly.
NewValue = A.A5; if isnan(A.A5) NewValue = A.A8; end
I also tried to identified with (:,1) in the script. It does not seem to help.
NewValue(:,1)= A.A5(:,1); if isnan(A.A5(:,1)) NewValue(:,1) = A.A8(:,1); end
Best Answer