MATLAB Easiest way to assign elements of a vector to individual variables.
- by rlbond
So let's say I have a vector p = [1 2 3]. I want a command that looks like this:
[x y z] = p;
so that x = p(1), y = p(2), and z = p(3).
Is there an easy way to do this?