How to load matcont data file and plot

30 Ansichten (letzte 30 Tage)
Atom
Atom am 24 Dez. 2022
Beantwortet: Walter Roberson am 24 Dez. 2022
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?

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 24 Dez. 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');

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by