# Documentation

### This is machine translation

Translated by
Mouseover text to see original. Click the button below to return to the English verison of the page.

## Linear Optimization

MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.

### Note

Use only in the MuPAD Notebook Interface. This functionality does not run in MATLAB.

The `linopt` library provides algorithms for linear and integer programming. The routines in this library can be used in order to minimize and maximize a linear function subject to the set of linear constraints. It is possible to get only integer solutions. The routines for linear optimization are based on the two phase simplex algorithm. The algorithm of Land-Doig is used to find integer solutions.

The library functions are called using the library name `linopt` and the name of the function. E.g., use

```c := [{3*x + 4*y - 3*z <= 23, 5*x - 4*y - 3*z <= 10, 7*x + 4*y + 11*z <= 30}, - x + y + 2*z, {x, y, z}]: linopt::maximize(c)```

to solve the linear optimization problem defined in the variable `c`. This mechanism avoids naming conflicts with other library functions. If this is found to be inconvenient, then the routines of the `linopt` package may be exported via `use`. E.g., after calling

`use(linopt, maximize):`

the function `linopt::maximize` may be called directly:

```c := [{3*x + 4*y - 3*z <= 23, 5*x - 4*y - 3*z <= 10, 7*x + 4*y + 11*z <= 30}, - x + y + 2*z, {x, y, z}]: maximize(c)```

All routines of the `linopt` package are exported simultaneously by

`use(linopt):`

The functions available in the `linopt` library can be listed with:

`info(linopt)`
```Library 'linopt': a package for linear optimization ```
```-- Interface: ```
`linopt::Transparent, linopt::corners, linopt::maximize,`
`linopt::minimize, linopt::plot_data, `