What are the possible ways to solve the following set of equations?

조회 수: 2 (최근 30일)
Urvi
Urvi 2012년 10월 11일
My equations are as follows:
Algebraic Equations
b1=((b1+(1-exp(-b3))))
b2=b1-y(1)
b3=b1+b2+y(2)
Ordinary Differential Equations
dy(1)=-b1*y(1);
dy(2)=b3*y(1)+b2*y(2);
dy(3)=sqrt(b1)+y(1)+y(3);
Initial Values
b1=1,
b2=0,
b3=3
y1=1,
y2=3,
y3=0
I do not wish to substitute the values of any equation into some other equation. That is, I do not want to simplify it. How do I solve this? I have tried various techniques but I just cannot pass initial values for those algebraic equations. I want the code to calculate new b1 b2 b3 for every time step corresponding to the y value.
Thanks!
  댓글 수: 2
Azzi Abdelmalek
Azzi Abdelmalek 2012년 10월 11일
what technics have you tried?
Urvi
Urvi 2012년 10월 12일
1) Differential algebraic approach (But I am not getting the desired results. Also, my professor doesn't want me to use that right now).
2) Declaring b1 b2 b3 global and then using new values at every time step ( Problem with this the code gives me values of y1 y2 y3 at the time I want since I am specifying the interval and b1 b2 b3 are obtained at some other time interval. Also, at time t=0, the value of b1 b2 b3 are getting altered)

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

답변 (1개)

Azzi Abdelmalek
Azzi Abdelmalek 2012년 10월 11일
편집: Azzi Abdelmalek 2012년 10월 11일
for the first equation use fsolve http://www.mathworks.com/help/optim/ug/fsolve.html
for the second equation use ode45 http://www.mathworks.com/help/matlab/ref/ode45.html
  댓글 수: 1
Urvi
Urvi 2012년 10월 12일
fsolve will not give me the values at all the time steps. I want it at all the time steps. These values should be obtained for corresponding y values.

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

카테고리

Help CenterFile Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by