M=magic(10)index=[7,8,,5,9,45,43,23,34]M(index)=nan
Now how to fill up those Nan values such that it contains the nearest existing value
AND
second average of nearest existing values
matrixmatrix manipulationregionfill
M=magic(10)index=[7,8,,5,9,45,43,23,34]M(index)=nan
second average of nearest existing values
Best Answer