Using Runge Kutta function to solve Rossler equations

I have created a runge kutta 4th order function by so

댓글 수: 4

Where is f function?
I have f in [t,y]=RK4(f,tspan,y0,n);
HOw it looks like? Did you write it correctly?
yes I believe my function rk4 is perfect but Im not sure how to use it to solve the Rossler equations for initial conditions

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

 채택된 답변

darova
darova 2019년 11월 8일
Write your f function as
x'(t)=-x(t)-y(t)
y'(t)=ax(t)+y(t)
z'(t)=b+z(t)(x(t)-c)
%where I fix parameters say c=5, b=3, a=0.2 Xˆ = (0, 0, 0.2)^T time interval [0,250] and step size h=0.01
f = @(t,y) [ -y(1)-y(2)
a*y(1)+y(2)
b+y(3)*(y(1)-c) ];

추가 답변 (0개)

카테고리

질문:

2019년 11월 8일

편집:

2019년 11월 12일

Community Treasure Hunt

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

Start Hunting!

Translated by