How to load matcont data file and plot

35 views (last 30 days)
I want to plot the data file of a two parameter bifurcation diagram.
clear all
format long
set(0,'DefaultAxesFontSize',20);
figure;
load('H_H(1).mat')
load('H_H(2).mat')
In both the mat files, the x Array contain the two phase variables and two parameters. Identifying the parameters in x, I want to plot the diagram where the two parameters will be along x and y axis, respectively.
  • How to load only 'x'?
  • What would be the plot comand?

Accepted Answer

Walter Roberson
Walter Roberson on 24 Dec 2022
It is not clear what you want to plot?
format long
set(0,'DefaultAxesFontSize',20);
figure;
H1_struct = load('H_H(1).mat', 'x');
H1_x = H1_struct.x;
H2_struct = load('H_H(2).mat', 'x');
H2_x = H2_struct.x;
whos
Name Size Bytes Class Attributes H1_struct 1x1 36168 struct H1_x 5x900 36000 double H2_struct 1x1 12168 struct H2_x 5x300 12000 double ans 1x35 70 char cmdout 1x33 66 char
subplot(2,1,1);
plot(H1_x(4,:), H1_x(5,:)); title('H1 x 4 vs 5');
subplot(2,1,2);
plot(H2_x(4,:), H2_x(5,:)); title('H2 x 4 vs 5');

More Answers (0)

Categories

Find more on Graphics Objects in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!