title: Delete individual elements in a cell array
body: <p>I have a 100 X 1 (n1) cell array with each cell holding indices of a bigger data set(100 X 100, n2). I made a nested loop in order to access each individual element(index) and compare the values of another data set with these indices with a if condition. If the condition succeeds, I want to delete that element from the  original cell array into a new cell array. However when I set the element to [] in matlab, the value of the cell array does not change. The code is below:</p>
  
  <pre><code>for i = 1:length(n1)
      for j = 1:length(n1{i, 1})
          if n2(i,n1{i,1}(1,j)) &gt; n3(i) &amp;&amp; n2(i, n1{i,1}(1,j)) &gt; n4(n1{i, 1}(1, j))
              n1{i,1}(1,j) == [];
          end                          
      end
  end
  </code></pre>