title: How do i store an array of arrays?
body: <p>Im writing a function that returns an array of two arrays that i need:</p>
  
  <pre><code>e.g.
  arrayX = zeros(1, k);
  arrayY = zeros(1, k);
  
  for (i=1:k)
  xk=x&gt;i;
  dec_nums = histc(bin2dec(num2str([xk(:) y(:)],'%1d')),0:3);
  things = reshape(flipud(dec_nums),2,[])';
  
  sensitivity = things(1) / (things(1) + things(3));
  specificity = things(4) / (things(4) + things(2));
  s1 = 1 - sensitivity
  s2 = 1 - specificity
  arrayX(i, :) = s1;
  arrayY(i, :) = s2;
  
  array = [arrayX, arrayY];
  </code></pre>
  
  <p>but when i call array(1), it returns only the first number, nothing more?</p>
  
  <p>-edit-
  changing it to array = [arrayX; arrayY] returns</p>
  
  <pre><code>array =
  
      0.1061    0.1061    0.1061
      0.1259    0.1259    0.1259
      0.1324    0.1324    0.1324
      0.9999    0.9999    0.9999
      0.9997    0.9997    0.9997
      0.9996    0.9996    0.9996
  </code></pre>
  
  <p>which doesnt seem right either....is there anyway to simply return two arrays, so that when the function is done i'm able to get arrayX and arrayY?</p>