Borrar filtros
Borrar filtros

Please help extract variables from mat files and plot

1 visualización (últimos 30 días)
Calistus Ramotoroko
Calistus Ramotoroko el 8 de Abr. de 2019
Comentada: ELLER JUCO el 5 de Sept. de 2022
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!

Respuesta aceptada

A. Sawas
A. Sawas el 8 de Abr. de 2019
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 comentarios
Calistus Ramotoroko
Calistus Ramotoroko el 9 de Abr. de 2019
Thanks for the additional help Adam. I'm learning a lot from you guys.
ELLER JUCO
ELLER JUCO el 5 de Sept. de 2022
what if the variables under different site have same name?

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Line Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by