How to code the recurrence plot of this function?
2 次查看(过去 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 个评论
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!