title: How to extract a row of a matrix
body: <p>In every other language if I have a matrix, if I call a mono-dimensional index, the result will be an array.I don't know why in Matlab if you take a single index of a matrix, you'll get a single element, that's stupid.<br>
  Anyway in C:  </p>
  
  <pre><code>mat[4][4];
  </code></pre>
  
  <p>mat[0] is an array.  </p>
  
  <p>In Matlab:</p>
  
  <pre><code>mat=[1 2; 3 4];
  </code></pre>
  
  <p>How do I take the first row of the matrix? mat(1) is 1, not [1 2].</p>
  
  <p>EDIT: There is another problem, I have a problem with this function:  </p>
  
  <pre><code>function str= split(string, del)
  
  index=1;
  found=0;
  
  str=['' ; ''];
  
  for i=1:length(string)
      if string(i)==del
          found=1;
          index=1;
      elseif found==1
          str(2,index)=string(i);
          index=index+1;
      else
          str(1,index)=string(i);
          index=index+1;
      end
  end
  
  end
  </code></pre>
  
  <p>This returns sometimes a matrix and sometimes an array.<br>
  For example if I use split('FF','.') I get 'FF' as result, but what if I want to return a matrix? I can't even choose the dimensione of the matrix, in this context a weak typed language is a big disvantage.</p>