No BSD License  

Highlights from
vect2var

5.0

5.0 | 2 ratings Rate this file 1 Download (last 30 days) File Size: 1.34 KB File ID: #9088
image thumbnail

vect2var

by Christophe Meille

 

18 Nov 2005 (Updated 21 Nov 2005)

VECT2VAR Unpack vector to variables

| Watch this File

File Information
Description

[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

MATLAB release MATLAB 6.5.1 (R13SP1)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (2)
21 Nov 2005 Thierry Parisini  
08 Apr 2010 John D'Errico

To be honest, I think this should be part of the capability of deal if it was called with only one input argument. Regardless, this function does what it says it does. Good help. An H1 line.

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
matrices Christophe Meille 22 Oct 2008 08:07:07
variable Christophe Meille 22 Oct 2008 08:07:07
vector Christophe Meille 22 Oct 2008 08:07:07
unpack Christophe Meille 22 Oct 2008 08:07:07

Contact us at files@mathworks.com