Loading multiple mat files and plot them right
Mostrar comentarios más antiguos
I want to plot 3 different .mat files. My Structure looks something like this.
d = dir('*.mat');
Anzmat = length(d);
for j = 1:3 %just use the first 3 Files in the Order structure ->test 1, test 2, test 3
load(d(j).name)
%%%%%%%Calculations%%%%%%%
figure();
plot(t_LP, x_ac)
title('acceleration shorten file x-axis')
xlabel('time (s)')
ylabel('a (m/s^2)')
%%%%%%%Calculations%%%%%%%
figure();
plot(t_LP, y_ac)
title('acceleration shorten file y-axis')
xlabel('time (s)')
ylabel('a (m/s^2)')
%%%%%%%Calculations%%%%%%%
figure();
plot(t_LP, velocity_x)
title('velocity shorten file x-axis')
xlabel('time (s)')
ylabel('v (m/s)')
%%%%%%%Calculations%%%%%%%
figure();
plot(t_LP, velocity_y)
title('velocity shorten file y-axis')
xlabel('time (s)')
ylabel('v (m/s)')
%%%%%%%Calculations%%%%%%%
plot(t_LP,ac,'r')
title('final velocity')
xlabel('time (s)')
ylabel('v (m/s)')
end
Now my aim is to plot the Files: test 1, test 2, test 3 together in one diagramm. So in the end i should have 5 plots and in each are 3 diagramms from the test1,test2,test3 mat data. So i can clearly analyse how different the measurements are in one plot.
2 comentarios
Daniel Basow
el 18 de Jul. de 2021
Editada: Daniel Basow
el 18 de Jul. de 2021
Mathieu NOE
el 19 de Jul. de 2021
hmm
there are a few answers / posts about why one should avoid dynamic variable names (and therefore not use assignin)
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Direction of Arrival Estimation en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!