Hi all,
There are some functions in Matlab which gives multiple outputs, such as:
K>> [x, y, z] = ndgrid(-1:0, -1:0, -1:0)x(:,:,1) = -1 -1 0 0x(:,:,2) = -1 -1 0 0y(:,:,1) = -1 0 -1 0y(:,:,2) = -1 0 -1 0z(:,:,1) = -1 -1 -1 -1z(:,:,2) = 0 0 0 0
Is there a universal way to allow this kind of functions to give only 1 output which contains all available single outputs? Something like a cell contains 3 elements which are x,y and z here? Of course if there are more outputs than 3 from ndgrid the cell elements should increase accordingly.
Best Answer