lsqnonlin function take two initial guess for two different matrix parameter

I was working on a project trying to use Levenberg Marquardt algorithm to find suitable F and P result that will minimize:
F(i = 1 to 10) = sum( u(i) - F*P )
In this equation, F is a 3X4 matrix and P is a 4X3 matrix.
I know lsqnonlin() function can take one initial guess, so I can initial an F with zeros and pass to the lsqnonlin to get the solution for F. However, I think I will need to pass both F and P with an initial guess and find the solution for both.
Is there a way we can pass two initial guesses into lsqnonlin, or I need to combine P and F into one, however, they have different dimensions.

 Accepted Answer

You have F on both sides of the equation.
On the right side it appears to be 3 x 4 and P is 4 x 3 so F*P is 3 x 3 and u(i) - F*P would be 3 x 3, and sum() of that would then be 1 x 3.
The left side must have the same size as the right, so F(i) must be 1 x 3. We see from the "i = 1 to 10" that there must be at least 10 such F(i), which gives at least 10 * (1 x 3) = 30 values. But the right hand side F is only 12 values.
At this point we are stuck and must guess that the problem has not been correctly defined.

More Answers (0)

Categories

Find more on Mathematics in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!