Please help extract variables from mat files and plot

조회 수: 3 (최근 30일)
Calistus Ramotoroko
Calistus Ramotoroko 2019년 4월 8일
댓글: ELLER JUCO 2022년 9월 5일
Please help,
I have two .mat files (sit1.1 & site1.2 attached) containing different variables., rhoxy, rhoyx, zxy, zyx, freq, etc.
I want to load this two files and plot, for example extract values for rhoxy vs freq from each file and plot in a single plot.
Thanks!

채택된 답변

A. Sawas
A. Sawas 2019년 4월 8일
load('site1.1.mat');
site1 = site;
load('site1.2.mat');
site2 = site;
figure;
plot(site1.freq, site1.zxy, 'DisplayName', 'Site 1'); hold on;
plot(site2.freq, site2.zxy, 'DisplayName', 'Site 2');
xlabel('Freq');
ylabel('zxy');
legend show;
  댓글 수: 4
Calistus Ramotoroko
Calistus Ramotoroko 2019년 4월 9일
Thanks for the additional help Adam. I'm learning a lot from you guys.
ELLER JUCO
ELLER JUCO 2022년 9월 5일
what if the variables under different site have same name?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Legend에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by