Levenberg–Marquardt algorithm with fixing the last row of solution
Mostra commenti meno recenti
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 ?
Risposta accettata
Più risposte (1)
Mokhtar Bouain
il 16 Mag 2016
0 voti
1 Commento
Walter Roberson
il 16 Mag 2016
lsqnonlin passes in a vector. You need to make that vector into 3 x 4 so that you can paste on a bottom row. Then you make it a column vector again. The new output would look like
old(1,1)
old(2,1)
old(3,1)
new 0
old(1,2)
old(2,2)
old(3,2)
new 0
and so on, so it is not a simple manner of appending some values on to the end of it. The double reshape is the easiest way to inject the values in the places they are needed.
Categorie
Scopri di più su Matrices and Arrays in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!