vect2var

VECT2VAR Unpack vector to variables
981 Downloads
Updated 21 Nov 2005

No License

[x1, x2, x3,...] = vect2var(X) create variables x1, x2, x3... from the vector X in the current workspace such as x1 = X(1), x2 = X(2),
x3 = X(3)...
vect2var is usefull with the optimization toolbox in which unknown
variables can be grouped into a single row vector. vect2var allows
the use of common names for variables with a minimum waste of time.

Example :
X = [3E5 20 5 0.898];
[b f jh ws] = vect2var(X)
Returns :
b =
300000
f =
20
jh =
5
ws =
0.8980

Cite As

Christophe Meille (2024). vect2var (https://www.mathworks.com/matlabcentral/fileexchange/9088-vect2var), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R13SP1
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0