필터 지우기
필터 지우기

Substitution to solve Coupled differential equations

조회 수: 2 (최근 30일)
Shubham Agrawal
Shubham Agrawal 2019년 2월 6일
댓글: Shubham Agrawal 2019년 2월 7일
Hi,
I have the following types of equations:
Here F is known, so I will get p = g(x(i)) which gives me f(i) as a function of all x(i).
Now I need to solve the following coupled differential equations:
How can I solve this problem in MATLAB? Please help.
  댓글 수: 2
Torsten
Torsten 2019년 2월 7일
Here F is known, so I will get p = g(x(i)) which gives me f(i) as a function of all x(i).
I don't understand this. Could you clarify ?
Shubham Agrawal
Shubham Agrawal 2019년 2월 7일
Thanks for replying.
I know the numeric value of F, the second equation can be used to get p as a function of all x(i). When I substitute it back in the first equation, I can get f(i) as a function of all x(i). Now I have N diiferential equations which become coupled and can be used to solve for all x(i) as a function of time.
Please let me know if you need more clarification. I can share the equations too.
Thanks.

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

답변 (1개)

Bjorn Gustavsson
Bjorn Gustavsson 2019년 2월 7일
Just look at the examples for ode45 - there should be some example explaining how to write a function
returning dxdt when called. It would be something like this:
function dxdt = myode(t,x)
dxdt = zeros(numel(x),1)
dxdt(1) = f1(x,possibly,other,input,arguments);
dxdt(2) = f2(x,possibly,other,input,arguments);
...
dxdt(numel(x)) = fn(x,possibly,other,input,arguments);
end
HTH

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by