summaryrefslogtreecommitdiff
path: root/macros/qpipoptmat.sci
diff options
context:
space:
mode:
Diffstat (limited to 'macros/qpipoptmat.sci')
-rw-r--r--macros/qpipoptmat.sci5
1 files changed, 4 insertions, 1 deletions
diff --git a/macros/qpipoptmat.sci b/macros/qpipoptmat.sci
index b74c718..ca32f8e 100644
--- a/macros/qpipoptmat.sci
+++ b/macros/qpipoptmat.sci
@@ -145,6 +145,10 @@ function [xopt,fopt,exitflag,output,lambda] = qpipoptmat (varargin)
f = varargin(2);
nbVar = size(H,1);
+ if(nbVar == 0) then
+ errmsg = msprintf(gettext("%s: Cannot determine the number of variables because input objective coefficients is empty"), "qpipoptmat");
+ error(errmsg);
+ end
if ( rhs<3 ) then
A = []
@@ -424,5 +428,4 @@ function [xopt,fopt,exitflag,output,lambda] = qpipoptmat (varargin)
break;
end
-
endfunction