From a2d9c2bfd6eb83d1a494821176388eb312d08254 Mon Sep 17 00:00:00 2001 From: Harpreet Date: Mon, 25 Jan 2016 01:05:02 +0530 Subject: functions added --- macros/qpipoptmat.sci | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'macros/qpipoptmat.sci') 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 -- cgit