summaryrefslogtreecommitdiff
path: root/macros/lsqlin.sci
diff options
context:
space:
mode:
Diffstat (limited to 'macros/lsqlin.sci')
-rw-r--r--macros/lsqlin.sci5
1 files changed, 5 insertions, 0 deletions
diff --git a/macros/lsqlin.sci b/macros/lsqlin.sci
index 960b4db..97aaae6 100644
--- a/macros/lsqlin.sci
+++ b/macros/lsqlin.sci
@@ -151,6 +151,11 @@ function [xopt,resnorm,residual,exitflag,output,lambda] = lsqlin (varargin)
b = varargin(4);
nbVar = size(C,2);
+ if(nbVar == 0) then
+ errmsg = msprintf(gettext("%s: Cannot determine the number of variables because input objective coefficients is empty"), "lsqlin");
+ error(errmsg);
+ end
+
if ( rhs<5 ) then
Aeq = []
beq = []