How to code the recurrence plot of this function?

9 次查看(过去 30 天)
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