I can't load csv files properly.
15 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
勇気 捧
el 22 de Abr. de 2021
Comentada: Star Strider
el 23 de Abr. de 2021
Hi there.
I have been using the function dlmread to read csv files, but recently I have been getting errors.
I would like to know if there is a good solution.
0 comentarios
Respuesta aceptada
Star Strider
el 22 de Abr. de 2021
Since .csv files are strictly numeric (although they can haved the first row as non-numeric headers), the files could have nonumeric fields that are causing problems. The easiest way to deal with this is probably to use the readcell function (introduced in R2019a) to read them.
That will load the contents into a cell array. It will then be possible for you to see the contents and can help you understand what the problem is. If the files have non-numeric headers, you can then choose to not read the first line, or to use other fucntions such as readtable to read them correctly.
2 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Spreadsheets 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!