%% Outputs from Function That Uses varargout
% Determine how many outputs a function that uses varargout can return.
% In a file named mySize.m, create a function that returns a vector of dimensions from the size function and the individual dimensions using varargout.

type mySize.m

% Query how many outputs mySize can return.

fun = 'mySize';
nargout(fun)

% The minus sign indicates that the second output is varargout. The mySize function can return an indeterminate number of additional outputs.
% Copyright 2012 The MathWorks, Inc.