How to load matcont data file and plot

30 ビュー (過去 30 日間)
Atom
Atom 2022 年 12 月 24 日
回答済み: Walter Roberson 2022 年 12 月 24 日
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 Center および File ExchangeAnnotations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by