How to code the recurrence plot of this function?

조회 수: 9 (최근 30일)
hizaki
hizaki 2019년 12월 11일
Hi I am new to Matlab and I'm still confused how to do coding of recurrence plots. Do you have any idea? This is the sample code i have seen for runge kutta.
h=0.5;
t = 0:h:5;
t(1)=0; x(1) = 0.5;
F_tx = @(t,x) x-(t^2) +1;
for i=1:(length(t)-1)
k_1 = F_tx(t(i),x(i)); k_2 = F_tx(t(i)+0.5*h,x(i)+0.5*h*k_1); k_3 = F_tx((t(i)+0.5*h),(x(i)+0.5*h*k_2)); k_4 = F_tx((t(i)+h),(x(i)+k_3*h));
x(i+1) = x(i) + (1/6)*(k_1+2*k_2+2*k_3+k_4)*h; % main equation
end

답변 (0개)

카테고리

Help CenterFile Exchange에서 Mathematics에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by