Hi,
I have a buch of .txt files that i would like to import into matlab and put underneath oneanother in one big matrix.
I have put the files in sperate folders like January, February etc. until May.
Each txt file have headers in the first line.
Thanks in advance

댓글 수: 3

Adam Danz
Adam Danz 2019년 5월 7일
편집: Adam Danz 2019년 5월 7일
There are several ways to import text. Choosing the best method depends on the format of your data. Here's a description of some of those methods.
You'll probably loop through each file to read them in individually and then concatenate the data. If you don't already have a list of file names to feed into the loop, you can generate a list of (all) files in a directory using dir().
simen ommundsen
simen ommundsen 2019년 5월 8일
I got it working now, thanks!
Adam Danz
Adam Danz 2019년 5월 8일
Nice work!

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

답변 (0개)

카테고리

도움말 센터File Exchange에서 Environment and Settings에 대해 자세히 알아보기

태그

질문:

2019년 5월 7일

댓글:

2019년 5월 8일

Community Treasure Hunt

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

Start Hunting!

Translated by