필터 지우기
필터 지우기

How can i define algebraic equation in differential function in MATLAB?

조회 수: 1 (최근 30일)
fatemeh hosseini
fatemeh hosseini 2015년 10월 8일
편집: Torsten 2015년 10월 9일
I want to solve 7 equations. I define all of them in one function in MATLAB dy=function(t,y) for example one of the equation is : dy(i,j)=(Ao*epsilonf.*Ucp*y(i,j))-(kg*Ao.*(y(1,1)-y(2,1))) now i should solve a algebraic equation in this function too.this is my algebraic equation: y(i,10)=((Deff/deltar)*(y(i,10)-y(i-1,10)))+kgAo*(y(2,10)-y(3,10)) how can i do this? i put a small coefficient that eliminate dy 10^-10* dy(i,10)= -y(i,10)+((Deff/deltar)*(y(i,10)-y(i-1,10)))+kgAo*(y(2,10)-y(3,10)) but matlab couldnt solve it. could you help me please?

답변 (1개)

Torsten
Torsten 2015년 10월 9일
편집: Torsten 2015년 10월 9일
MATLAB's ODE solvers can account for systems which are a mixture of algebraic and differential equations.
Look at the example under
It should be easy to adapt it for your purpose.
Best wishes
Torsten.

카테고리

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