Prev: Sqauring a black and white image to its bounding box??
Next: Convert .avi to .bin (binary) file
From: anirban patra on 2 May 2010 11:33 hiii every one. I need help in solving a pair of nonlinear decoupled matrix equation using fsolve. I want use fsolve to solve the equations with in a loop. the equations goes like....for example, 1) gk-gk1-(A-S*P1)' *gk - P1*fk1 -(fx_k1 - P1*B*inv(R)*fu_k1)*(P1*x_k1 + P2*z + gk1)=0 2) xk - x_k1 - (A-S*P1)' *xk - S*(P2*z + gk - B*fu_k1*(P1*xk + P2*z + gk1))+f_k1=0 where, gk and xk are [2*1] unknown vectors need to be determined. all other terms are known, A,S,P1,P2 are 2*2 known matrices. gk1,fk1, fx_k1 etc. are all knowns either 2*1 vector or 2*2 matrix. I cannot write the equations in the form: F(1)=0; F(2)=0;....F(n)=0; as, I want to call fsolve in a loop, and most of the terms eg. P1, P2,etc comes from previous iteration result. I mean P1, P2 ...values are different for each iteration. Is this type of problem can be solved by fsolve? If not please suggest me the proper method. If it is possibele then please explain how to use fsolve here. Thanks in advance, waiting for your comment.
From: Bruno Luong on 2 May 2010 13:34 "anirban patra" <anirban.chem.iitg(a)gmail.com> wrote in message <hrk5vf$foi$1(a)fred.mathworks.com>... > > I cannot write the equations in the form: F(1)=0; F(2)=0;....F(n)=0; as, I want to call fsolve in a loop, and most of the terms eg. P1, P2,etc comes from previous iteration result. I mean P1, P2 ...values are different for each iteration. There is no problem of writing a function equation with changing parameters (depending on the loop in your case). Click on the link "Passing extra Parameters ..." in the first box of this page: http://www.mathworks.com/access/helpdesk/help/toolbox/optim/ug/fsolve.html Bruno
|
Pages: 1 Prev: Sqauring a black and white image to its bounding box?? Next: Convert .avi to .bin (binary) file |