Filter a data table (timebased) based on another table (based on known lap intervals)

1 vue (au cours des 30 derniers jours)
Gabi
Gabi le 18 Août 2022
Commenté : Gabi le 18 Août 2022
Hi,
I've got 2 tables, 1 containg the continuous data (data.mat) data and 1 containg the lap start stop intervals (ends.mat).
I'm looking at generating new T2 tables from the original T table for each start-stop interval (all columns) and save as a separate files (laps), in this example 3 laps.
Thanks.

Réponse acceptée

Chunru
Chunru le 18 Août 2022
load data.mat
load ends.mat
for i=1:size(E, 1)
idx = T.Time >= E.Start_time(i) & T.Time <= E.Stop_time(i);
T2 = T(idx, :);
save("NewTable"+i+".mat", "T2");
end
dir
. .. NewTable1.mat NewTable2.mat NewTable3.mat data.mat ends.mat

Plus de réponses (0)

Catégories

En savoir plus sur Tables dans Help Center et File Exchange

Produits


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by