How to read multiple .spc files

조회 수: 14 (최근 30일)
NCA
NCA 2021년 6월 1일
답변: Jeremy Huard 2023년 1월 31일
Hi there
Please can someone help me with this
I am using tgspcread to open/read my spectral data files
I need to read 222 .spc files and concatenate them into Matlab before applying a Machine learning algorithm on it, is there a code I can use to read all at once instead of doing it one at a time .
Thanks

채택된 답변

Jan
Jan 2021년 6월 2일

추가 답변 (1개)

Jeremy Huard
Jeremy Huard 2023년 1월 31일
I would suggest to look at fileDatastore with @tgspcread as ReadFcn argument.
You can then :
  • either read all data at once with readall
  • or convert the datastore into a tall array.
Tall array can then be passed directly to machine learning algorithms. Here is an example.

카테고리

Help CenterFile Exchange에서 Large Files and Big Data에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by