summaryrefslogtreecommitdiff
path: root/qpipopt/qpipopt_logical_2.sce~
blob: 5c5694b4b0d1cf5a51aabcf13cb003e0646fbf34 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
//Find x in R^6 such that:
// Check for the Q to be a symmetric matrix
conMatrix= [];
conLB=[];
conUB = [];
lb=[];
ub=[];
p=[2 -35 -47]'; 
Q =[5   -2   -1; -2   4   3; -1   3   5];
nbVar = 3;
nbCon = 0;
[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,Q,p,lb,ub,conMatrix,conLB,conUB)

//Output
// lambda  =
// 
//   lower: [0,0,0]
//   upper: [0,0,0]
//   constraint: [0x0 constant]
// output  =
// 
//   Iterations: 1
// exitflag  =
// 
//  0  
// fopt  =
// 
//  - 249.  
// xopt  =
// 
//    3.  
//    5.  
//    7.