VARARGOUT VARARGOUT Variable Output Arguments Usage FreeMat functions can return a variable number of output arguments by setting the last argument in the argument list to varargout. This special keyword indicates that the number of return values is variable. The general syntax for a function that returns a variable number of outputs is function [out_1,...,out_M,varargout] = fname(in_1,...,in_M) The function is responsible for ensuring that varargout is a cell array that contains the values to assign to the outputs beyond out_M. Generally, variable output functions use nargout to figure out how many outputs have been requested.