Hi,
I have matrices in which I want to fill the nans with the last available number. for example: A=[ 1 nan;nan 3;nan 2;4 nan;nan nan]; I want it to become A=[ 1 nan;1 3;1 2;4 2;4 2]; Is there an easy way of replacing these nans without running a loop. I have large matrices and I need to do this frequently. So,I am wondering if an easy command exists.
Best Answer