Possible Duplicate:
How do I do multiple assignment in MATLAB?
Say I have vector of values, v = 1:3
,
and I want to assign the vector values to variables so a=1, b=2, c=3
.
Trying to do so with [a, b, c] = deal(v)
results with a=b=c=[1 2 3]
.
Does anyone know any one-liner for doing so, other than the obvious a=v(1), b=v(2), c=v(3)
?