Borrar filtros
Borrar filtros

Get MatLAB to read data instead of text

4 visualizaciones (últimos 30 días)
Emily McLain
Emily McLain el 15 de Nov. de 2022
Comentada: Walter Roberson el 15 de Nov. de 2022
I have some data in Excel that I'm trying to import into MatLAB. The imported file works fine, except MatLAB is recognizing the first colum as text instead of data. Essentially, MatLAB skips the first column of data and goes right to the second because it thinks the first column is text. This has really screwed up my code/data plots... Does anyone know how to get MatLAB to read text as data?

Respuestas (1)

David Hill
David Hill el 15 de Nov. de 2022
t=readtable('yourFile.csv');
  1 comentario
Walter Roberson
Walter Roberson el 15 de Nov. de 2022
readmatrix instead of readable if you want to force the first column to numeric. Or else fiddle with import options.
Or possibly the situation calls for HeaderLines

Iniciar sesión para comentar.

Community Treasure Hunt

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

Start Hunting!

Translated by