How to load matcont data file and plot

35 次查看(过去 30 天)
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?

采纳的回答

Walter Roberson
Walter Roberson 2022-12-24
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');

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Graphics Objects 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by