importdata cuts my files in half!

drct = 'S_up_';
top = importdata(strcat(drct,'200.txt'));
The attached .txt file is 5000 rows tall, but when I use importdata or load, it only loads the first 2500 rows.
There is no header, only straight data. I also tried specifying space delimiter but the problem persists.
So it exactly cuts my data in half, Weird.
version R2016a

1 comentario

Stephen23
Stephen23 el 11 de Ag. de 2020
Editada: Stephen23 el 11 de Ag. de 2020
"The attached .txt file is 5000 rows tall, but when I use importdata or load, it only loads the first 2500 rows."
The file actually has 2500 rows, this is the end of the file:

Iniciar sesión para comentar.

Respuestas (1)

Cris LaPierre
Cris LaPierre el 11 de Ag. de 2020
Editada: Cris LaPierre el 11 de Ag. de 2020

0 votos

When I open the file you have attached (outside MATLAB), it only contains 2500 rows. Perhaps you meant to attach a different file? Or perhaps you are mistaken in thinking the file has 5000 rows?

1 comentario

Chris Nixon
Chris Nixon el 11 de Ag. de 2020
Hi Chris, it turns out the problem was in the path setting, about 100 lines earlier in the code! I thought it was getting cut in half because of the last time value but it turns out it was just loading a completely different file.
Anyway, your comment helped me locate the problem. Thanks so much!

Iniciar sesión para comentar.

Categorías

Más información sobre Large Files and Big Data en Centro de ayuda y File Exchange.

Productos

Versión

R2016a

Etiquetas

Preguntada:

el 11 de Ag. de 2020

Editada:

el 11 de Ag. de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by