Quadprog with 4d tensor H and 2d matrix F

2 views (last 30 days)
Daniel Crane
Daniel Crane on 29 Jun 2015
Edited: Matt J on 29 Jun 2015
I'm trying to solve the following quadratic programming problem:
min_L 1⁄2<L,HL> + <F,L>
where H is a tensor living in R^ d x d x d x d (so a 4d matrix), and F is a matrix in R^ d x d (2d matrix), and min_L corresponds to a minimisation with respect to L.
However, when I try to use MATLAB's quadprog command, using quadprog(H,F), I get the following error:
The number of rows and columns in H must equal the number of elements of f.
The specific details about the construction of H and F, and the problem in general can be seen in this paper from equation (13) onwards.

Answers (1)

Matt J
Matt J on 29 Jun 2015
Edited: Matt J on 29 Jun 2015
You must reshape H to be an ordinary 2D matrix and F to be a vector. It doesn't seem like the original 4D shape of H should be germane to what you're trying to do in the optimization. Surely H is a linear operator acting on L, so it can be rewritten somehow as a matrix. Similarly, the inner product between F and L can equally well be done between F(:) and L(:).

Community Treasure Hunt

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

Start Hunting!