Extracting data from large file
9 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi all,
I have been writing code to read data from a binary file. I have gotten to the stage now where I just need to reorganize the data, but I have a question about how to go about the organization.
The binary file contains 1310720 elements, comprising of 20, 256*128 images with real and imaginary data points. When loaded into MATLAB it is a row column vector. I know that the first 512 elements belong to image1, the second to image2...., then finally the twentieth to image twenty. Then the twenty first to image1 and so on.... My question is, how would I go about writing code for this extraction? I have tried writing some in a simple loop, but I haven't yet been able to come up with a way to make it anything but very laborious. Any help would be appreciated.
0 commentaires
Réponse acceptée
Walter Roberson
le 22 Déc 2016
Guessing a bit about the format:
temp = reshape(TheVector, 512, 20, []);
images = permute( temp(1:256, :, :), [1 3 2]) + i * permute( temp(257:512, :, :), [1 3 2]);
and then the third dimension would be the image number.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Audio and Video Data dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!