fscanf returns an empty array

2 Ansichten (letzte 30 Tage)
Fátima
Fátima am 5 Mai 2014
Beantwortet: José-Luis am 5 Mai 2014
Hello, I am trying to open a file with aprox. 1000000 lines and 3 columns, but I am having some problems to read the file. File format: -15.409204 ; -4.211755 ; 1.578635; ......
I used fscanf to read the file, but after debbuging it returns an empty array... seems to be related to a lack of memory, the code runs well in a computer with 8gb memory fid1 = fopen('vel1.txt','r'); vel = fscanf(fid1, '%f %f %f', [3 inf]); fclose(fid1);
To implement the algorithm that I want, I need to have the entire 3 arrays (each one corresponding to columns 1, 2 and 3), excluding the possibility to process the data by blocks. Is there other way to process this data, in a computer with less memory? Thank you

Akzeptierte Antwort

José-Luis
José-Luis am 5 Mai 2014
doc memmapfile

Weitere Antworten (0)

Kategorien

Mehr zu Workspace Variables and MAT Files finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by