Commit abc60b60 authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Test if control toolbox is present if lyapunov=square_root_solver

parent 4e537fcd
......@@ -85,7 +85,15 @@ if method == 3
end;
elseif method == 4
% works only with Matlab System Control toolbox or octave the control package,
% the presence of the toolbox or package has to be tested
if exist('OCTAVE_VERSION')
if ~user_has_octave_forge_package('control')
error('lyapunov=square_root_solver not available; you must install the control package from Octave Forge')
end
else
if ~user_has_matlab_license('control_toolbox')
error('lyapunov=square_root_solver not available; you must install the control system toolbox')
end
end
chol_b = R*chol(b,'lower');
Rx = dlyapchol(a,chol_b);
x = Rx' * Rx;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment