fread: how to read n bytes from bin files
Show older comments
Hi! I have a binary file. It consists of records: 8 byte long, 4 byte float, 4 byte float, 4 byte float. I want to read the file into array Nx4. N - records number. How can I do it? I tried fread but without result.
1 Comment
Alexander Voznesensky
on 7 Jul 2017
Accepted Answer
More Answers (1)
Walter Roberson
on 7 Jul 2017
0 votes
memmapfile allows you to declare patterns of fields and so is suitable for reading in repeated structures.
Categories
Find more on Low-Level File I/O in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!