title: Splitting of cell arrays according to a value and storing the indoces in MATLAB
body: <p>I am stuck with a problem statement in MATLAB. I have a matrix H containing only 0 and 1 and I need to seperate the rows and columns into different cell array. From there I need to make another set which contains the value of each indices in row and column containing 1. The index numbering should be unique. Could someone please help me with it.I need individual set containing only the value of rows with 1 and column with 1. Any help would be appreciated.</p>
  <p>I have the following matrix with me:</p>
  <pre><code>H= [1 1 0 0 1;1 0 1 0 1;1 1 0 0 0;0 0 0 1 0];
      
  
  rows = num2cell(H,2); % rows of the matrix
  columns = num2cell(H,1); % columns of the matrix
  
  
  </code></pre>