MATLAB: Replace values with nans

idxnan

I have a matrix data. i applied a condition and i get the idx. i want to replace that idx values with Nans.
plz suggest the process for this.
Thanks….

Best Answer

data(idx)=NaN