I have a 3x2 cell array data where each cell contains a double matrix. It looks something like this:
{600x4 double} {600x4x3 double}
{600x4 double} {600x4x3 double}
{600x4 double} {600x4x3 double}
Now, I would like to replace the second column of the cell array with NaNs. The result should therefore look like this:
{600x4 double} {[NaN]}
{600x4 double} {[NaN]}
{600x4 double} {[NaN]}
Using curly braces is leading nowhere.
data{:,2} = nan
Expected one output from a curly brace or dot indexing expression, but there were 3 results.
I think I could use cellfun or a simple for-loop to change the values to NaN. However, I would like to know if there's a more simple solution?