Open this Example

Create Scalar Optimization Variable

Create a scalar optimization variable named dollars.

dollars = optimvar('dollars')
dollars = 

  OptimizationVariable with properties:

          Name: 'dollars'
          Type: 'continuous'
    IndexNames: {{}  {}}
    LowerBound: -Inf
    UpperBound: Inf

See variables with showvar.
See bounds with showbounds.