Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How could I solve the following optimization problem using MATLAB or an other way?

Given ${E}^{1}, {A}^{21}, {A}^{22}, {C}^{1}, {A}^{12}$

$ \underset{{C}^{2}, {E}^{2}}{min} {\left \| {C}^{2}{E}^{1} - {A}^{21} \right \|}_{F}^{2} + {\left \| {C}^{2}{E}^{2} - {A}^{22} \right \|}_{F}^{2} + {\left \| {C}^{1}{E}^{2} - {A}^{12} \right \|}_{F}^{2} $

I know the approximated linear solution, assuming $ {A}^{22} $ is negligible is given by:

$ {C}^{2} = {A}^{21} {{E}^{1}}^{T} {\left( {E}^{1} {{E}^{1}}^{T} \right)}^{-1}, {E}^{2} = {\left( {\begin{bmatrix} {C}^{1}\\ {C}^{2} \end{bmatrix}}^{T} \begin{bmatrix} {C}^{1}\\ {C}^{2} \end{bmatrix} \right)}^{-1} {\begin{bmatrix} {C}^{1}\\ {C}^{2} \end{bmatrix}}^{T} \begin{bmatrix} {A}^{12}\\ {A}^{22} \end{bmatrix} $

Yet it would be nice to know how to solve it accurately. Thanks.

share|cite|improve this question
Note that , if you fix $E^2$(or $C^2$), you can exactly solve for $C^2$(or $E^2$). You can take an iterative approach to solving this. 1. Initialize $E^2$ arbitrarily 2. Solve for $C^2$, say $C^{'}_2$ 3. Set $C^2$ to $C^{'}_2$ 4. Solve for $E^2$, say $E^{'}_2$ 5. Set $E^2$ to $E^{'}_2$ 6. Goto Step 2 – TenaliRaman Aug 9 '12 at 6:57
Hi, I found a way to solve it as an Non Linear LS. The problem is computing the Jacobian of the Cost Function. See… Thank You! – Drazick Aug 9 '12 at 7:06
for the jacobian, note that $||A||_F = trace(A^{T}A)$. Now, use the matrix cookbook [1], to help get the derivatives. [1] – TenaliRaman Aug 9 '12 at 7:18
The problem is when I use 'lsnonlin' in MATLAB it asks for the Jacobian where the input is a vector. Meaning the expression should be derived by every single item in C2 and E2. For instance, how do you derive the expression by $ {C}^{2}_{1, 1} $? – Drazick Aug 9 '12 at 7:46
Derivative of a function always lies in the domain of the function. This means that the derivative of your objective has to be a matrix. If you want to translate this into a vector, then rewrite your objective function in terms of the individual matrix components. Then take derivative w.r.t each component. – TenaliRaman Aug 9 '12 at 8:14

Since your problem is unconstrained you can us fminunc to solve it in MATLAB (given an initial starting point $x_0$). Perhaps, you can use your approximate solution as $x_0$.

share|cite|improve this answer
Yet it is a function of 2 variables - C2 and E2. – Drazick Aug 5 '12 at 5:57

OK, it turns out the best way to solve it is using MATLAB's 'lsnonlin' function. Now, I just need to compute the Jacobain of the function relative to C2, E2 and the Frobenius Norm.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.