Reshaping a matrix with binary numbers

5 visualizaciones (últimos 30 días)
daniel cohen
daniel cohen el 3 de Dic. de 2021
Comentada: daniel cohen el 3 de Dic. de 2021
Hey,
I have a matrix with binary numbers 3840x6 as unit16
and I'd like to reshape it with 8 columns to show a picture eventually like so:
such that every row is exactly one byte, 8 bits.
can I do in with reshape function?
also Im sending my data here.

Respuesta aceptada

Matt J
Matt J el 3 de Dic. de 2021
Editada: Matt J el 3 de Dic. de 2021
can I do in with reshape function?
Sure, along with some transposes. Those would be avoidable if you stored your data column-wise in conformity with Matlab's column-major data organization.
A=reshape(A.',8,[]).';

Más respuestas (0)

Categorías

Más información sobre Logical en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by