title: How can I use matlab table (array with named variables) in octave
body: <p>In Octave I code:</p>
  
  <pre><code>T = table([10;20],{'M';'F'},'VariableNames',{'Age','Gender'},'RowNames',{'P1','P2'})
  </code></pre>
  
  <p>From the example on this website: <a href="https://www.mathworks.com/help/matlab/ref/table.html" rel="nofollow noreferrer">https://www.mathworks.com/help/matlab/ref/table.html</a> </p>
  
  <p>And get error: </p>
  
  <pre><code>'t' undefined near line 1 column 1
  &gt;&gt; [T, L_X] = table([10;20],{'M';'F'},'VariableNames',{'Age','Gender'},'RowNames',{'P1','P2'})
  error: Invalid call to table.  Correct usage is:
  -- [T, L_X] = table (X)
  </code></pre>
  
  <p>But when I change to <code>[T, L_X] = ...</code>  or to <code>[T, L_X, L_Y] = ...</code>  I get the same error. What am I doing wrong and what am I misunderstanding? What should I do to get the example right?  Is this an issue of Matlab/Octave differences? </p>