Bifurcation Diagram will not graph
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
My code below will run but does not graph a bifurcation diagram it just results in an empty figure with axis, can anyone see what I have done wrong?
Thankyou
figure;
ax(1) = axes;
hold on
xlabel ('k');
ylabel ('C');
xlim([-2 2]);
ylim([0 40]);
x=1;
for k = [-0.5:0.1:1.6]
syms c
eqn = (1/10)*((c-23)*(25-c)*(c-29))-k ==0;
Solution = vpasolve(eqn, c);
x=x+1;
Solution
plot(ax(1), k, Solution)
end
0 comentarios
Respuestas (1)
Star Strider
el 27 de Mayo de 2021
Plot the points —
figure;
ax(1) = axes;
hold on
xlabel ('k');
ylabel ('C');
xlim([-2 2]);
ylim([0 40]);
x=1;
k = [-0.5:0.1:1.6];
Solution = cell(size(k)); % Preallocate
for k1 = 1:numel(k)
syms c
eqn = (1/10)*((c-23)*(25-c)*(c-29))-k(k1) ==0;
Solution{:,k1} = double(vpasolve(eqn, c));
% x=x+1
plot(ax(1), k(k1), Solution{k1}, '.')
end
hold off
grid
Out = [k; cell2mat(Solution)]
Not what appears to me to be a bifurcation plot, however it is a plot!
0 comentarios
Ver también
Categorías
Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!