Clear Filters
Clear Filters

How to code the recurrence plot of this function?

2 views (last 30 days)
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

Answers (0)

Categories

Find more on Mathematics in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!