my data is of 1×12 cells and 600×4 matrix in each cell but i want to replace 0 with NaN only in 4th column of matrix in each cell data{1,t}(data{1,t}(:,4)==0)=0 this command doesnt convert 0 to NaN While if i try this: data{1,t}(data{1,t}==0)=0 it converts 0 from all columns to NaN which is not desirable
MATLAB: Replace 0 with NaN for specific column in a matrix within cell
nan
Related Question
- Does a cell vector contains only NaN
- Find the last NaN value in cell array and compare it with the next column
- How to select or group sections of an array without using indexing
- How to replace the NaN with 0 in a cell array that has the following anatothe 10×1 cell Each cell is of size 10173 x 2, (dates and values)
- Replace NaN’s in a cell array with blanks (not empty char/string)
Best Answer