How to solve a parametric differential equation in MATLAB
조회 수: 9 (최근 30일)
이전 댓글 표시
Hello all,
I have a differential equation which is as follows:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/290019/image.jpeg)
I want to solve the above differential equation and find y(t) in terms of a and b.
I also have the following initial condition:
t=294 y=0
댓글 수: 0
채택된 답변
Ameer Hamza
2020년 5월 3일
편집: Ameer Hamza
2020년 5월 3일
You can use dsolve() if you have symbolic toolbox
syms y(t) a b
eq = diff(y) == a*exp(b/t)*(1-y);
ic = y(294) == 0;
sol = dsolve(eq, ic)
Result:
sol =
1 - exp(294*a*exp(b/294) - a*b*ei(b/294))*exp(a*b*ei(b/t) - a*t*exp(b/t))
Note that the output is given in term of an integral function ei(): https://www.mathworks.com/help/releases/R2020a/symbolic/ei.html
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Calculus에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!