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 Kommentar

Stephen23
Stephen23 am 11 Aug. 2020
Bearbeitet: Stephen23 am 11 Aug. 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:

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Cris LaPierre
Cris LaPierre am 11 Aug. 2020
Bearbeitet: Cris LaPierre am 11 Aug. 2020

0 Stimmen

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 Kommentar

Chris Nixon
Chris Nixon am 11 Aug. 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!

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Large Files and Big Data finden Sie in Hilfe-Center und File Exchange

Produkte

Version

R2016a

Gefragt:

am 11 Aug. 2020

Bearbeitet:

am 11 Aug. 2020

Community Treasure Hunt

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

Start Hunting!

Translated by