Extracting data from large file
9 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Martin
el 22 de Dic. de 2016
Comentada: Martin
el 23 de Dic. de 2016
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 comentarios
Respuesta aceptada
Walter Roberson
el 22 de Dic. de 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.
Más respuestas (0)
Ver también
Categorías
Más información sobre Audio and Video Data en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!