Borrar filtros
Borrar filtros

How to read multiple .spc files

21 visualizaciones (últimos 30 días)
NCA el 1 de Jun. de 2021
Respondida: Jeremy Huard el 31 de En. de 2023
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 .

Respuesta aceptada

Jan el 2 de Jun. de 2021

Más respuestas (1)

Jeremy Huard
Jeremy Huard el 31 de En. de 2023
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.


Más información sobre Import, Export, and Conversion en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by