showvar

Display optimization variable

Description

example

showvar(var) displays the optimization variable var at the Command Window.

Examples

collapse all

Create an optimization variable and display it.

var = optimvar('var',8,3,'Type','integer');
showvar(var)
    [ var(1, 1)    var(1, 2)    var(1, 3) ]
    [ var(2, 1)    var(2, 2)    var(2, 3) ]
    [ var(3, 1)    var(3, 2)    var(3, 3) ]
    [ var(4, 1)    var(4, 2)    var(4, 3) ]
    [ var(5, 1)    var(5, 2)    var(5, 3) ]
    [ var(6, 1)    var(6, 2)    var(6, 3) ]
    [ var(7, 1)    var(7, 2)    var(7, 3) ]
    [ var(8, 1)    var(8, 2)    var(8, 3) ]

Input Arguments

collapse all

Optimization variable, specified as an OptimizationVariable object. Create var using optimvar.

Example: var = optimvar('var',4,6)

Compatibility Considerations

expand all

Not recommended starting in R2019b

Introduced in R2017b