Open this Example

Create Optimization Variable Vector

Create a 3-by-1 optimization variable vector named x.

x = optimvar('x',3)
x = 

  3×1 OptimizationVariable array with properties:

 Array-wide properties:
          Name: 'x'
          Type: 'continuous'
    IndexNames: {{}  {}}

 Elementwise properties:
    LowerBound: [3×1 double]
    UpperBound: [3×1 double]

See variables with showvar.
See bounds with showbounds.