Loading multiple mat files and plot them right
Mostra commenti meno recenti
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 Commenti
Daniel Basow
il 18 Lug 2021
Modificato: Daniel Basow
il 18 Lug 2021
Mathieu NOE
il 19 Lug 2021
hmm
there are a few answers / posts about why one should avoid dynamic variable names (and therefore not use assignin)
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Direction of Arrival Estimation in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!