MATLAB Answers

how i can solve a system of 5 equation where there is numbers

조회 수: 2(최근 30일)
bassam shallak
bassam shallak 20 Oct 2014
편집: SK 20 Oct 2014
hi there i have a system of equation of 5 varaibales as follows :
-(l1+l2)*p1 +p2*(u2)+p3*0+p4*u2=0
l1*p1-p2*(u2+u1)+p3*0+p5*u2==0)
(p2*l2-p3*u1==0)
(l2*p1+p3*u1-p4*(l1+u2)==0)
(l1*p4-u2*p5==0)
(p1+p2+p3+p4+p5==1)
p1 p2 p3 p4 p5 are the unkown while l1 l2 l3 l4 l5 and u1 u2 u3 u4 u5 are the values but I the unkown in terms of l1 l2 l3 l4 l5 and u1 u2 u3u u4 u5 is this possible or not ?

  댓글 수: 0

로그인 to comment.

답변(4개)

SK
SK 20 Oct 2014
Check the symbolic toolbox and "Mupad" that comes with it.

  댓글 수: 0

로그인 to comment.


comlich
comlich 20 Oct 2014
Hello,
Unfortunately, there is no a way to find an analytical solution in such a complex situation or system of equations. The main reason is that, the solution depends on whether the matrix of the system (when rewritten in the matrix form: Ap=b) is invertible or not.
I have had such a problem with differentials equation which have unknown parameters, see the attached part of a report's draft.

  댓글 수: 0

로그인 to comment.


comlich
comlich 20 Oct 2014
By 'analytical solution', of course I mean analytical solution which depends on the parameters l_i and u_i. You can sill give it a try with Matlab, but I fear that it will return an useless solution (even by using symbolics).

  댓글 수: 0

로그인 to comment.


SK
SK 20 Oct 2014
You should be able to get a symbolic solution - makes no difference what the values of the parameters are. They don't come into play at all. After all it is just Cramer's rule. Having said that, note:
1. You have 6 equations in 5 unknowns so you wont get a symbolic solution.
2. The Symbolic toolbox is S***. Unmentionable word here. It will take you some time to get used to its quirks. Plus the confusion between the Mupad documentation and the matlab - the syntax is totally inconsistent. Best of luck trying to use it. I have written a few m-files to construct and solve some specific large linear systems. Works, but the frustration is not worth the effort.

  댓글 수: 2

John D'Errico
John D'Errico 20 Oct 2014
Problems with 6 equations in 5 unknowns are NOT directly solvable by Cramer's rule, and even if you could do so, Cramer's rule would be a poor way to solve the problem.
SK
SK 20 Oct 2014
That is exactly what I said in point 1. No need to repeat it.
As for Cramer's rule I mentioned it just to indicate that there is a symbolic solution which can be found using solve or perhaps linsolve or whatever. I didn't recommend actually using it to solve the equations.
Moreover, I suspect, but I'm not sure, that the question poster intended to have 5 equations but made some sort of a typo in his post.

로그인 to comment.

이 질문에 답변하려면 로그인을(를) 수행하십시오.

제품


Translated by