필터 지우기
필터 지우기

How to solve an ODE with a function symbolically?

조회 수: 38 (최근 30일)
Edgard El Cham
Edgard El Cham 2017년 10월 17일
댓글: Karan Gill 2017년 10월 17일
So I have this ODE to solve (26) with a set of conditions (27). I evaluated the conditions prior to going forward to solve the ODE. I want to solve it symbolically for each mk because I will use the results later on. I wrote a function file for dmk/dt, and then in a loop I want to solve for each mk and save the function. However I am not sure if I am able to save all the functions in a matrix. Moreover, when I input the initial conditions while using ode45, I get an error. This is the code in the loop:
[t,m]=ode45('mp',[0,10],m0val(x));
where m0val(x) contains the values for the initial conditions.
  댓글 수: 3
Edgard El Cham
Edgard El Cham 2017년 10월 17일
Thank you, I think that's what I was looking for.
Karan Gill
Karan Gill 2017년 10월 17일
Great! I copied my comment to an Answer. If this was what you wanted, could you accept the Answer?

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

답변 (1개)

Karan Gill
Karan Gill 2017년 10월 17일

카테고리

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