Solving a QP by minimizing multiple multidimensional vectors

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.

 采纳的回答

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)
Solving problem using quadprog. Your Hessian is not symmetric. Resetting H=(H+H')/2. The problem is non-convex.
sol = struct with fields:
x: [3×1 double] y: [4×1 double]

更多回答(0 个)

类别

在 帮助中心 和 File Exchange 中查找有关 Quadratic Programming and Cone Programming 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by