Scilab Home page | Wiki | Bug tracker | Forge | Mailing list archives | ATOMS | File exchange
Please login or create an account
Change language to: English - Français - Português - 日本語 -

Please note that the recommended version of Scilab is 6.1.1. This page might be outdated.
However, this page did not exist in the previous stable version.

Справка Scilab >> Optimization and Simulation > Semidefinite Programming > lmitool


Graphical tool for solving linear matrix inequations.

Calling Sequence





a string referring to a .sci function


a string containing the name of the problem


a string containing the names of the unknown matrices (separated by commas if there are more than one)


a string containing the names of data matrices (separated by commas if there are more than one)


a string providing information on what the user should do next


lmitool(filename) is used to redefine interactively a LMI problem, filename must have been initially generated by lmitool. In the non interactive mode, txt=lmitool(probname,varlist,datalist) generates a file in the current directory. The name of this file is obtained by adding .sci to the end of probname. This file is the skeleton of a solver function and the corresponding evaluation function needed by lmisolver.


// Find diagonal matrix X (i.e. X = diag(diag(X), p=1) such that
//A1'*X+X*A1+Q1 < 0, A2'*X+X*A2+Q2 < 0 (q=2) and trace(X) is maximized

// Constants
rand("seed", 0);
n  = 2;
A1 = rand(n, n);
A2 = rand(n, n);
Xs = diag(1:n);
Q1 = -(A1'*Xs+Xs*A1+0.1*eye());
Q2 = -(A2'*Xs+Xs*A2+0.2*eye());

lmitool("prob", "X", "A1, A2"); // Create prob.sci
deletefile "prob.sci";
copyfile("SCI/modules/optimization/demos/prob_bak.sci", "prob.sci"); // Replace prob.sci by prob_bak.sci
exec("prob.sci", -1);

X = prob(A1, A2) // Run optimization, X = [1.0635042 0; 0 2.0784841]

[Y, Z, c] = prob_eval(X); // Check evaluaton function value at the point found
// Y = 0
// Z = list([0.0731600 0.7080179; 0.7080179 0.7186999], [0.1154910 0.5345239; 0.5345239 1.4843684])
// c = -1.0635042

deletefile "prob.sci"; // Delete created file

See Also

  • lmisolver — Solve linear matrix inequations.
Scilab Enterprises
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Thu Oct 02 14:01:07 CEST 2014