Info

This question is closed. Reopen it to edit or answer.

Reading a file divided in block and inside each block the data contained is non-homogeneous in format not in amount of elements to be read

1 view (last 30 days)
Hello I have to read a huge file with data divided in blocks. For many of them I can use textscan because the number of elements is constant but there are two blocks that I do not know how to read. One of those problematic block are of the form
608751 0 'pepito' -1.5 2.3 123 0.25 456 0.75
4.5 78.9 'fulanito'
645671 0 'cucu' -1.5 2.3 123 0.25 12 1
1.5 8.9 'zutanito'
The secon line with two data correspond to the information of book in the previous line. How can I read these kind of data. Moreover if the second component of the first line is different from 0 I have more data to read. How can I do it?
I have proved using fscanf and it didn't work, or I didn't know how to do it.
Thank you

Answers (0)

Community Treasure Hunt

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

Start Hunting!