필터 지우기
필터 지우기

How to import multiple .mot files?

조회 수: 17 (최근 30일)
Alexa Z
Alexa Z 2020년 12월 12일
편집: Cris LaPierre 2020년 12월 13일
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?

답변 (2개)

Cris LaPierre
Cris LaPierre 2020년 12월 13일
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
Cris LaPierre
Cris LaPierre 2020년 12월 13일
편집: Cris LaPierre 2020년 12월 13일
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.

댓글을 달려면 로그인하십시오.


Stephen23
Stephen23 2020년 12월 13일
편집: Stephen23 2020년 12월 13일
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

카테고리

Help CenterFile Exchange에서 Data Import and Export에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by