Prev: Problem with parfor
Next: frame based integrator
From: Tato on 29 Jul 2010 04:08 Dear Friends, Please, help me to solve the following problem. Any hint or comment would be thankful. I have two expressions: 1) One is Determinant (4X4), which contains two unknown variables (x1,x2). 2) Another is some expression f(x1,x2). I would like to find solution (x1,x2), which satisfies: Det=0 and f(x1,x2)=0 Could you please give me some advice. Thank you. Tato
From: Torsten Hennig on 29 Jul 2010 00:28 > Dear Friends, > Please, help me to solve the following problem. Any > hint or comment would be thankful. > > I have two expressions: > 1) One is Determinant (4X4), which contains two > unknown variables (x1,x2). > 2) Another is some expression f(x1,x2). > > I would like to find solution (x1,x2), which > satisfies: > Det=0 and f(x1,x2)=0 > > Could you please give me some advice. Thank you. > > Tato Is it a standard problem concerned with the determination of eigenvalues ? Then maybe MATLAB's eig-function can be of use. Otherwise you have two equations in two unknowns - try fsolve. Best wishes Torsten.
From: Tato on 29 Jul 2010 05:36 Dear Torsten, Thank you very much for your reply. But, I am just starting in detail Matlab. I have still some difficulties. Could you give me some additional hint. For example. I write very simple expressions (mine is much much complicated but just as an example to understand) and please tell me, how can I program in Matlab to solve the unknowns (x1,x2): for example: 1) Det=[1-x1 1; 6 x2] 2) f(x1,x2)=2*x1-x2 How can I find solutions (x1,x2) satisfying: Det=0 and f=0. Thank you very much.
From: Torsten Hennig on 29 Jul 2010 03:11 > Dear Torsten, > > Thank you very much for your reply. But, I am just > starting in detail Matlab. I have still some > difficulties. Could you give me some additional hint. > > For example. I write very simple expressions (mine is > much much complicated but just as an example to > understand) and please tell me, how can I program in > Matlab to solve the unknowns (x1,x2): > > for example: > > 1) Det=[1-x1 1; 6 x2] > 2) f(x1,x2)=2*x1-x2 > > How can I find solutions (x1,x2) satisfying: > Det=0 and f=0. > > Thank you very much. function F = myfun(x) F = [(1-x(1))*x(2)-6 ; 2*x(1)-x(2)]; x0 = [-5; -5]; % Make a starting guess at the solution options=optimset('Display','iter'); % Option to display output [x,fval] = fsolve(@myfun,x0,options) % Call optimizer Best wishes Torsten.
From: Tato on 29 Jul 2010 09:30 Dear Torsten, Thank you very very much. Tato
|
Pages: 1 Prev: Problem with parfor Next: frame based integrator |