How to represent a chaotic trajectory in MatLab?

2 Ansichten (letzte 30 Tage)
Cristian Gav
Cristian Gav am 22 Jun. 2019
Beantwortet: Star Strider am 22 Jun. 2019
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

Akzeptierte Antwort

Star Strider
Star Strider am 22 Jun. 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).

Weitere Antworten (0)

Kategorien

Mehr zu Programming finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by