Node:Variable-length return lists, Next:, Previous:Variable-length argument lists, Up:Octave Features



Variable-length return lists

Octave also has a real mechanism for handling functions that return an unspecified number of values, so it is no longer necessary to place an upper bound on the number of outputs that a function can produce.

Here is an example of a function that uses the new syntax to produce N values:

function [...] = foo (n)
  for i = 1:n
    vr_val (i);
  endfor
endfunction