How to represent a chaotic trajectory in MatLab?

2 ビュー (過去 30 日間)
Cristian Gav
Cristian Gav 2019 年 6 月 22 日
回答済み: Star Strider 2019 年 6 月 22 日
Hello everyone. I tried to represent the following ODE system in Matlab but I don't know how to find if it has chaotic trajectory or not. Any ideas?
ODEfcn = @(t,x,a) [0.25*(a*x(1)*(1-x(1))) - 0.0015*x(2) - 0.3*x(1); 0.25*x(1)*(1-x(1)) - 0.0515*x(2)];
ic = [1 1];
tspan = [0 50];
a = 2;
[t,y] = ode45(@(t,x)ODEfcn(t,x,a), tspan, ic);
figure
plot(t, y)
grid

採用された回答

Star Strider
Star Strider 2019 年 6 月 22 日
I remember this system. I do not know what you intend by ‘chaotic trajectory’ here.
If you want to plot the derivative of ‘k’ with respect to time as a function of the derivatve of ‘y’ with respect to time, this works:
for k = 1:numel(t)
ddt(k,:) = ODEfcn(t(k),y(k,:),a); % Calculate Derivatives From Solved Values & ‘ODEfcn’
end
figure
plot(ddt(:,1), ddt(:,2))
grid
axis equal
xlabel('$\frac{dy(t)}{dt}$', 'Interpreter','latex')
ylabel('$\frac{dk(t)}{dt}$', 'Interpreter','latex')
The integrated functions themselves are given by ‘y(:,1)’ for ‘y’, and ‘y(:,2)’ for ‘k’ (remembering those from your earlier Question).

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeProgramming についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by