Is there anything like deal() for normal MATLAB arrays? [duplicate]

One option is to convert your array to a cell array first using NUM2CELL:

myArray = [1, 2, 3];
cArray = num2cell(myArray);
[a, b, c] = cArray{:};

As you note, you don’t even need to use DEAL to distribute the cell contents.

Leave a Comment