How to code the recurrence plot of this function?

1 回表示 (過去 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 Center および File ExchangeMathematics についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by