Clear Filters
Clear Filters

plot the bifurcation into multiple colors on mathematical modelling case

5 views (last 30 days)
I want to plot bifurcation, this is the result I want. Parameter space Phi × u for Pr = 0.002.
I don't have any idea how to make this. I only have this script (attach)

Accepted Answer

Sargondjani
Sargondjani on 7 Feb 2023
I dont have time to look into your code, but I usually plot bifurcations using "contour". I compute the eigenvalues, and then define the fieds in the graphs by setting the boundaries of the countour to the bifurcation values. An example of my code:
contour(mm_vec,z1_vec,l1,[1 1],'-k','LineWidth',LW);
contour(mm_vec,z1_vec,l2,[1 1],'-','LineWidth',LW,'Color',[0 0.447 0.741],'HandleVisibility','off');
contour(mm_vec,z1_vec,l3,[1 1],'-b','LineWidth',LW,'HandleVisibility','off');%'Color',[0.85 0.325 0.098]
contour(mm_vec,z1_vec,l1,[-1 -1],'-.k','LineWidth',LW);
contour(mm_vec,z1_vec,l2,[-1 -1],'-.','LineWidth',LW,'Color',[0 0.447 0.741]);
contour(mm_vec,z1_vec,l3,[-1 -1],'-.b','LineWidth',LW,'HandleVisibility','off');%,'Color',[0.85 0.325 0.098]
contour(mm_vec,z1_vec,imag_size,[1e-8 1e-8],':','LineWidth',LW2,'Color',[0.85 0.325 0.098]);%,'fill','on');
In this code mm and z1 are the axis (bifurcation parameters), and l1, l2 and l3 are the eigenvalues, and imag_size is the imaginary part when there exists complex eigenvalues. (Note that these are discrete time bifurcations).
To get smooth plots in case of non-linear graphs your vectors mm and z1 have to be large.

More Answers (0)

Categories

Find more on Nonlinear Analysis in Help Center and File Exchange

Products


Release

R2021a

Community Treasure Hunt

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

Start Hunting!