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 CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by