I have the following function:
function [varargout] = mytest()r = ceil( rand * 10)for n = 1:r varargout{n} = n;end
I want all the outputs from the function execution. When I try the following:
[out{1:nargout(@mytest)}]=mytest
I receive the following error message:
The left hand side is initialized and has an empty range of indices. However, the right hand side returned one or more results.
How can bring all the outputs of the function into the MATLAB workspace.
Best Answer