bifurcation for Fractional order
I need an example matlab code to draw a bifurcation diagram for a fractional orde system. (for parametre varying or FO q varying, as seen in figures)
I’ve done some research on the subject and found The code by @Marius-F. Danca (2023) can be found at this File Exchange link:
Matlab code for FO logistic map, MATLAB Central File Exchange. Retrieved October 24, 2023.
However, I can’t plot the bifurcation diagram for the FO case.
code for the graphical representation of the bifurcation proposed by Sam Chak
interval = [2.8 4.0];
accuracy = 0.001;
reps = 100; % number of repetitions
numtoplot = 50;
initidx = reps – (numtoplot – 1);
for r = interval(1):accuracy:interval(2)
x = 0.4;
xo = x;
for n = 2:reps
xn = r*xo*(1 – xo);
x = [x xn];
xo = xn;
end
plot(r*ones(numtoplot), x(initidx:reps), ‘.’, ‘MarkerSize’, 1, ‘Color’, ‘#be4d25’),
hold on
end
hold off
xlim([2.8 4])
title(‘Logistic Map’)
xlabel(‘itr’, ‘FontSize’, 14)
ylabel(‘itx’, ‘FontSize’, 14)
However, the fractional order need a workaround, i fond the code by @Marius-F. Danca
but I don’t know how it works, Can anyone kindly share *.m file
function [u]=FO_discrete(q,p,u0,n_max)
% Author: Marius-F. Danca 2021
u=zeros(n_max,1); % memory alocation
u(1)=u0+f(u0); % u(1) outside of the loops
for n=2:n_max; % $u(2),u(3),…,n(n_max)$
s=exp(gammaln(n-1+q)-gammaln(n))*f(u0);
for j=2:n;
s=s+exp(gammaln(n-j+q)-gammaln(n-j+1))*f(u(j-1));
end
u(n)=u0+s/gamma(q);
end
function ff=f(x); % logistic map
ff=p*x*(1-x);
end
endI need an example matlab code to draw a bifurcation diagram for a fractional orde system. (for parametre varying or FO q varying, as seen in figures)
I’ve done some research on the subject and found The code by @Marius-F. Danca (2023) can be found at this File Exchange link:
Matlab code for FO logistic map, MATLAB Central File Exchange. Retrieved October 24, 2023.
However, I can’t plot the bifurcation diagram for the FO case.
code for the graphical representation of the bifurcation proposed by Sam Chak
interval = [2.8 4.0];
accuracy = 0.001;
reps = 100; % number of repetitions
numtoplot = 50;
initidx = reps – (numtoplot – 1);
for r = interval(1):accuracy:interval(2)
x = 0.4;
xo = x;
for n = 2:reps
xn = r*xo*(1 – xo);
x = [x xn];
xo = xn;
end
plot(r*ones(numtoplot), x(initidx:reps), ‘.’, ‘MarkerSize’, 1, ‘Color’, ‘#be4d25’),
hold on
end
hold off
xlim([2.8 4])
title(‘Logistic Map’)
xlabel(‘itr’, ‘FontSize’, 14)
ylabel(‘itx’, ‘FontSize’, 14)
However, the fractional order need a workaround, i fond the code by @Marius-F. Danca
but I don’t know how it works, Can anyone kindly share *.m file
function [u]=FO_discrete(q,p,u0,n_max)
% Author: Marius-F. Danca 2021
u=zeros(n_max,1); % memory alocation
u(1)=u0+f(u0); % u(1) outside of the loops
for n=2:n_max; % $u(2),u(3),…,n(n_max)$
s=exp(gammaln(n-1+q)-gammaln(n))*f(u0);
for j=2:n;
s=s+exp(gammaln(n-j+q)-gammaln(n-j+1))*f(u(j-1));
end
u(n)=u0+s/gamma(q);
end
function ff=f(x); % logistic map
ff=p*x*(1-x);
end
end I need an example matlab code to draw a bifurcation diagram for a fractional orde system. (for parametre varying or FO q varying, as seen in figures)
I’ve done some research on the subject and found The code by @Marius-F. Danca (2023) can be found at this File Exchange link:
Matlab code for FO logistic map, MATLAB Central File Exchange. Retrieved October 24, 2023.
However, I can’t plot the bifurcation diagram for the FO case.
code for the graphical representation of the bifurcation proposed by Sam Chak
interval = [2.8 4.0];
accuracy = 0.001;
reps = 100; % number of repetitions
numtoplot = 50;
initidx = reps – (numtoplot – 1);
for r = interval(1):accuracy:interval(2)
x = 0.4;
xo = x;
for n = 2:reps
xn = r*xo*(1 – xo);
x = [x xn];
xo = xn;
end
plot(r*ones(numtoplot), x(initidx:reps), ‘.’, ‘MarkerSize’, 1, ‘Color’, ‘#be4d25’),
hold on
end
hold off
xlim([2.8 4])
title(‘Logistic Map’)
xlabel(‘itr’, ‘FontSize’, 14)
ylabel(‘itx’, ‘FontSize’, 14)
However, the fractional order need a workaround, i fond the code by @Marius-F. Danca
but I don’t know how it works, Can anyone kindly share *.m file
function [u]=FO_discrete(q,p,u0,n_max)
% Author: Marius-F. Danca 2021
u=zeros(n_max,1); % memory alocation
u(1)=u0+f(u0); % u(1) outside of the loops
for n=2:n_max; % $u(2),u(3),…,n(n_max)$
s=exp(gammaln(n-1+q)-gammaln(n))*f(u0);
for j=2:n;
s=s+exp(gammaln(n-j+q)-gammaln(n-j+1))*f(u(j-1));
end
u(n)=u0+s/gamma(q);
end
function ff=f(x); % logistic map
ff=p*x*(1-x);
end
end mar MATLAB Answers — New Questions