This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Linear Optimization

MuPAD® notebooks are not recommended. Use MATLAB® live scripts instead.

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


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}]:

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}]:

All routines of the linopt package are exported simultaneously by


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

Library 'linopt': a package for linear optimization
-- Interface:
linopt::Transparent, linopt::corners,   linopt::maximize,
linopt::minimize,   linopt::plot_data,                  
Was this topic helpful?