Filter löschen
Filter löschen

Error whilst using textscan function to read data

1 Ansicht (letzte 30 Tage)
Hamza
Hamza am 9 Jan. 2014
Bearbeitet: Hamza am 9 Jan. 2014
Hi Everyone,
I am trying to extract data using the textscan function.
After I open the data_file.txt file, Matlab is happy to read in the Mach and Incidence values (lines 6 to 8 in matlab script and line 992 in data file) as well as the Lift and Moment Coeff. (Lines 10-12). The problem starts at line 14, for some reason Matlab does not continue to read the data file ( Error: Index exceeds matrix dimensions. Error in test (line 15) data.CDP = number{1}(1)).
However, if I first close and then open the file again and set HeaderLines to the correct value to read CDP, it works. It also works if I ignore lines 10-12 and go straight to line 14.
I was wondering if there is a way to avoid having to keep opening and closing the data file but this seems to be the only way to get the script to run.
Thank you in advance,
Hamza

Antworten (0)

Kategorien

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

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by