You don’t need deal
at all (edit: for Matlab 7.0 or later) and, for your example, you don’t need mat2cell
; you can use num2cell
with no other arguments::
foo = [88, 12];
fooCell = num2cell(foo);
[x y]=fooCell{:}
x =
88
y =
12
If you want to use deal
for some other reason, you can:
foo = [88, 12];
fooCell = num2cell(foo);
[x y]=deal(fooCell{:})
x =
88
y =
12