MATLAB: Levenberg–Marquardt algorithm with fixing the last row of solution

MATLAB

Hi all, I am using Levenberg–Marquardt algorithm to do an optimization(I use lsqnonlin function). In fact I want to get a solution that I fix its last row. In fact my solution has this following forme :
X=[ x11 x12 x13 x14 ;
x21 x22 x23 x24 ;
x31 x32 x33 x34 ;
0 0 0 1 ]
So I want to get a solution using Levenberg–Marquardt with fixing its last row to [0 0 0 1] Any help please ?

Best Answer

g = @(x) YourFunction( reshape([reshape(x, 3, 4); 0 0 0 1], [], 1) )
then optimize g
Related Question