Solving a QP by minimizing multiple multidimensional vectors
3 views (last 30 days)
Show older comments
Hello, I would like to solve a quadratic programming problem in multiple vectors.
Does anyone know a function like quadprog that allows me to solve this? Thank you in advance.
0 Comments
Accepted Answer
Matt J
on 18 Nov 2021
Edited: Matt J
on 18 Nov 2021
If you have multiple unknown vectors x1, x2, x3,... then you also have a single unknown vector X=[x1;x2;x3;...]. So, just use quadprog() as usual with X as your unknown.
You can also use the problem-based workflow to translate the problem into proper quadprog input, e.g.,
x=optimvar('x',3,'Lower',0);
y=optimvar('y',4,'Upper',1);
Qx=rand(3); Qy=rand(4);
prob=optimproblem('Objective',x'*Qx*x + y'*Qy*y);
sol=solve(prob)
More Answers (0)
See Also
Categories
Find more on Quadratic Programming and Cone Programming in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!