Trying to extract data from a csv file
Mostrar comentarios más antiguos
Hello, I'd like to create a data logging system that extracts a certain cell range from an excel file, but I'm running into trouble.
Here is my very simple code:
filename = 'mydata.csv';
M = csvread('mydata.csv',3,4,[3,4,22,4])
Here is the error I am getting:
Error using dlmread (line 147)
Mismatch between file and format string.
Trouble reading 'Numeric' field from file (row number 1,
field number 7) ==> hours instead of 24,\n
Error in csvread (line 50)
m=dlmread(filename, ',', r, c, rng);
Error in Untitled (line 2)
M = csvread('lap shear data.csv',3,4,[3,4,22,4])
Does anyone know why this is happening? I just want to extract the column that has the numbers (Column 5).. Not sure why it's trying to read the next one over.
Thanks in advance!!
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Spreadsheets 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!