title: Replace NaN with zeros in cell array in MATLAB
body: <p>I have a 50x25 cell array in the variable <code>raw_data</code>. Each cell contains a 200x150 matrix. I have a few <code>NaN</code> values scattered between all those values and I want to set them to <code>zeros</code> to make sure they do not interfere at later stages.</p>
  
  <p>I have tried the following:</p>
  
  <pre><code>raw_data(cellfun(@(x) any(isnan(x), raw_data, 'UniformOutput', false)) = 0
  </code></pre>
  
  <p>When running the script, I get "Function 'subindex' is not defined for values of class 'cell'". Can anyone help me, please?</p>
  
  <p>Thanks in advance!</p>