Solving system of nonlinear equations

조회 수: 2 (최근 30일)
omnia
omnia 2012년 8월 2일
편집: John Kelly 2015년 3월 2일
Hello all. I want to solve 10 nonlinear equations in 10 variables. I used 'solve' function but it didn't give me a result " it takes too much time and nothing happened". Is there any other way to do that? The equations are generated within the program.
  댓글 수: 24
Walter Roberson
Walter Roberson 2012년 8월 9일
The poster is using R14. I don't know if matlabFunction() was available back then?
omnia
omnia 2012년 8월 11일
matlabfunction is not available in my version which I think makes this issue tedious for me.
To Walter: I do not understand what do you mean by "You are not leaving anything to vary to be solved by fsolve()". I think what I wrote is the syntax expression to fsolve. I passed the equations to 'myfun1' (symbolic equations). Then I specified the symbols to be substituted with the initial guess (ones for all the symbols).

댓글을 달려면 로그인하십시오.

답변 (1개)

Honglei Chen
Honglei Chen 2012년 8월 2일
Do you have Optimization Toolbox? If so, you can try fsolve
  댓글 수: 6
omnia
omnia 2012년 8월 5일
the problem with me is that fsolve requires to write the equations manually in a separate file. In my program I generate them in a for loop (I posted this part of the program above)
Walter Roberson
Walter Roberson 2012년 8월 5일
Use matlabFunction() to convert the symbolic equations into something that fsolve() can deal with.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Symbolic Computations in MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by