How to represent a chaotic trajectory in MatLab?

2 visualizzazioni (ultimi 30 giorni)
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

Risposta accettata

Star Strider
Star Strider il 22 Giu 2019
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).

Più risposte (0)

Categorie

Scopri di più su Programming in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by