How to import multiple .mot files?

How do you import multiple .mot files?
I have a sequence of files like 1.mot and 2.mot and 3.mot files. How do I import the data in one time?

Réponses (2)

Cris LaPierre
Cris LaPierre le 13 Déc 2020

0 votes

You could probably use a file datastore. I don't know what a *.mot file is, so can't comment on the specifics, but you might find this video from our Practical Data Science course on Coursera a good starting place.

1 commentaire

Cris LaPierre
Cris LaPierre le 13 Déc 2020
Modifié(e) : Cris LaPierre le 13 Déc 2020
If you are using fileDataStore and all your files have the same formatting, you should be able to use the uniformRead,true Name-value pair. This is covered starting around 2:45 in the video.

Connectez-vous pour commenter.

Stephen23
Stephen23 le 13 Déc 2020
Modifié(e) : Stephen23 le 13 Déc 2020

0 votes

S = dir(filePattern);
for k = 1:numel(S)
F = fullfile(S(k).folder, S(k).name);
fprintf('Now reading %s\n', F);
S(k).data = importdata(F);
end

Catégories

En savoir plus sur Historical Contests dans Centre d'aide et File Exchange

Question posée :

le 12 Déc 2020

Modifié(e) :

le 13 Déc 2020

Community Treasure Hunt

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

Start Hunting!

Translated by