필터 지우기
필터 지우기

Second Order Runge-Kutta Method for Problem

조회 수: 1 (최근 30일)
David Geistlinger
David Geistlinger 2019년 11월 8일
편집: Jeremy 2019년 11월 8일
4a.PNG
I am trying to generate a second order Runge Kutta method in matlab for the above problem and not sure where to start. Tried asking for help but was shown Mathematica code and example and I dont have Mathematica. Any help would be appreicated.

답변 (1개)

Jeremy
Jeremy 2019년 11월 8일
The ode solvers built into MATLAB are based on the runge-kutta method. Are you meant to implement your own method, or can you use ode23?
  댓글 수: 2
David Geistlinger
David Geistlinger 2019년 11월 8일
Can use existing method im just not sure how to use the runge kutta method in matlab
Jeremy
Jeremy 2019년 11월 8일
편집: Jeremy 2019년 11월 8일
I would encourage you to read the documentation. Here is some syntax, if I read your problem correctly this should be the solution to the first part of your problem using ode23:
dxdt = @(t,x) 0.02 - 0.01*sqrt(x);
x0 = 0;
tspan = [0 600];
sol = ode23(dxdt,tspan,x0);
plot(sol.x,sol.y)
Also, please look at this:
doc ode23

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

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by