some function has arbitrary number of input and output. Lets look at ndgrid
for example: you can give N inputs, and get N outputs.
v={1:10,2:20,3:30...}
[d0,d1,...]=ndgrid(v{:});
is there's anyway to get all outputs into a cell array, e.g.
[d{:}]=ndgrid(v{:});