Creating new matrices with input depending on csv filename
Mostrar comentarios más antiguos
Hi.
I have a bunch of csv files containing charge and discharge data that I would like to separate into a charge matrix and a discharge matrix.
The filenames in the folder for the charge data are CYCLE0_CHG, CYCLE2_CHG, CYCLE4_CHG, etc. and the filenames for the discharge data are CYCLE1_DIS, CYCLE3_DIS, CYCLE5_DIS, etc.
The following is my initial step at dividing the files into 2 variables based on their file name.
filepath = 'C:\Kikusui testing\12s2p Cycling\CH1_2023_3_6_14_32';
fileinfo1 = filepath(dir('_CHG.csv'));
fileinfo2 = filepath(dir('_DIS.csv'));
However, I am getting the error "Unable to use a value of type struct as an index."
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Cell Arrays en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!