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 CenterFile Exchange에서 Programming에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by