MATLAB: Check all values in a table if any is “NAN”

table

I have a table that has multiple column and rows. I want to say if any value in the table was "NAN" then change the value from "NAN" to 1.
Any suggestion?

Best Answer

This may work for your case
tbl = fillmissing(tbl,'constant',1);
assuming the NaNs are the only values that count as missing for you.