@@ -281,11 +281,11 @@ function [xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (varargin
281
281
end
282
282
if (rhs==5 ) then
283
283
param=varargin(5 );
284
- Checktype (" fmincon" , param, " options" , 5 , " st" );
284
+ fot_Checktype (" fmincon" , param, " options" , 5 , " st" );
285
285
end
286
286
if (rhs==7 ) then
287
287
param=varargin(7 );
288
- Checktype (" fmincon" , param, " options" , 7 , " st" );
288
+ fot_Checktype (" fmincon" , param, " options" , 7 , " st" );
289
289
end
290
290
291
291
// Storing the Input Parameters
@@ -312,7 +312,7 @@ function [xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (varargin
312
312
if (rhs>8 ) then
313
313
if (type(varargin(9 ))==17 )
314
314
param = varargin(9 );
315
- Checktype (" fmincon" , param, " options" , 9 , " st" );
315
+ fot_Checktype (" fmincon" , param, " options" , 9 , " st" );
316
316
else
317
317
nlc = varargin(9 );
318
318
end
@@ -327,10 +327,10 @@ function [xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (varargin
327
327
328
328
329
329
// To check whether the 1st Input argument (fun) is a function or not
330
- Checktype (" fmincon" , fun, " f" , 1 , " function" );
330
+ fot_Checktype (" fmincon" , fun, " f" , 1 , " function" );
331
331
332
332
// To check whether the 2nd Input argument (x0) is a vector/scalar
333
- Checktype (" fmincon" , x0, " x0" , 2 , " constant" );
333
+ fot_Checktype (" fmincon" , x0, " x0" , 2 , " constant" );
334
334
335
335
// To check and convert the 2nd Input argument (x0) to a row vector
336
336
if ((size(x0,1 )~=1 ) & (size(x0,2 )~=1 )) then
@@ -370,7 +370,7 @@ function [xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (varargin
370
370
endfunction
371
371
372
372
// To check whether the 3rd Input argument (A) is a Matrix/Vector
373
- Checktype (" fmincon" , A, " A" , 3 , " constant" );
373
+ fot_Checktype (" fmincon" , A, " A" , 3 , " constant" );
374
374
375
375
// To check for correct size of A(3rd paramter)
376
376
if (size(A,2 )~=s(2 ) & size(A,2 )~=0 ) then
@@ -381,7 +381,7 @@ function [xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (varargin
381
381
s1=size(A);
382
382
383
383
// To check whether the 4th Input argument (b) is a vector/scalar
384
- Checktype (" fmincon" , b, " b" , 4 , " constant" );
384
+ fot_Checktype (" fmincon" , b, " b" , 4 , " constant" );
385
385
386
386
// To check for the correct size of b (4th paramter) and convert it into a column vector which is required for Ipopt
387
387
if (s1(2 )==0 ) then
@@ -407,7 +407,7 @@ function [xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (varargin
407
407
end
408
408
409
409
// To check whether the 5th Input argument (Aeq) is a matrix/vector
410
- Checktype (" fmincon" , Aeq, " Aeq" , 5 , " constant" );
410
+ fot_Checktype (" fmincon" , Aeq, " Aeq" , 5 , " constant" );
411
411
412
412
// To check for the correct size of Aeq (5th paramter)
413
413
if (size(Aeq,2 )~=s(2 ) & size(Aeq,2 )~=0 ) then
@@ -418,7 +418,7 @@ function [xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (varargin
418
418
s2=size(Aeq);
419
419
420
420
// To check whether the 6th Input argument(beq) is a vector/scalar
421
- Checktype (" fmincon" , beq, " beq" , 6 , " constant" );
421
+ fot_Checktype (" fmincon" , beq, " beq" , 6 , " constant" );
422
422
423
423
// To check for the correct size of beq(6th paramter) and convert it into a column vector which is required for Ipopt
424
424
if (s2(2 )==0 ) then
@@ -445,7 +445,7 @@ function [xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (varargin
445
445
446
446
447
447
// To check whether the 7th Input argument (lb) is a vector/scalar
448
- Checktype (" fmincon" , lb, " lb" , 7 , " constant" );
448
+ fot_Checktype (" fmincon" , lb, " lb" , 7 , " constant" );
449
449
450
450
// To check for the correct size and data of lb (7th paramter) and convert it into a column vector as required by Ipopt
451
451
if (size(lb,2 )==0 ) then
@@ -468,7 +468,7 @@ function [xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (varargin
468
468
end
469
469
470
470
// To check whether the 8th Input argument (ub) is a vector/scalar
471
- Checktype (" fmincon" , ub, " ub" , 8 , " constant" );
471
+ fot_Checktype (" fmincon" , ub, " ub" , 8 , " constant" );
472
472
473
473
// To check for the correct size and data of ub (8th paramter) and convert it into a column vector as required by Ipopt
474
474
if (size(ub,2 )==0 ) then
@@ -578,7 +578,7 @@ function [xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (varargin
578
578
end
579
579
580
580
// If options has been entered, then check its type for 'list'
581
- Checktype (" fmincon" , param, " options" , 10 , " st" );
581
+ fot_Checktype (" fmincon" , param, " options" , 10 , " st" );
582
582
583
583
// To set default values for options, if user doesn't enter options
584
584
options = list(" MaxIter" , [3000 ], " CpuTime" , [600 ] );
@@ -660,7 +660,7 @@ function [xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (varargin
660
660
661
661
// To check for correct input of Objective Gradient function from the user
662
662
if (flag1==1 ) then
663
- Checktype (" fmincon" , fGrad, " fGrad" , 10 , " function" );
663
+ fot_Checktype (" fmincon" , fGrad, " fGrad" , 10 , " function" );
664
664
665
665
if (execstr(' sample_fGrad=fGrad(x0)' ,' errcatch' )==21 )
666
666
errmsg = msprintf(gettext(" %s: Gradient function of Objective and x0 did not match " ), " fmincon" );
@@ -679,7 +679,7 @@ function [xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (varargin
679
679
680
680
// To check for correct input of Lagrangian Hessian function from the user
681
681
if (flag2==1 ) then
682
- Checktype (" fmincon" , lHess, " lHess" , 10 , " function" );
682
+ fot_Checktype (" fmincon" , lHess, " lHess" , 10 , " function" );
683
683
684
684
if (execstr(' sample_lHess=lHess(x0,1,1:no_nlc)' ,' errcatch' )==21 )
685
685
errmsg = msprintf(gettext(" %s: Hessian function of Objective and x0 did not match " ), " fmincon" );
@@ -694,7 +694,7 @@ function [xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (varargin
694
694
695
695
// To check for correct input of Constraint Gradient function from the user
696
696
if (flag3==1 ) then
697
- Checktype (" fmincon" , cGrad, " cGrad" , 10 , " function" );
697
+ fot_Checktype (" fmincon" , cGrad, " cGrad" , 10 , " function" );
698
698
699
699
if (execstr(' [sample_cGrad,sample_ceqg]=cGrad(x0)' ,' errcatch' )==21 )
700
700
errmsg = msprintf(gettext(" %s: Gradient function of Constraint and x0 did not match " ), " fmincon" );
0 commit comments