Effacer les filtres
Effacer les filtres

Reshaping a matrix with binary numbers

4 vues (au cours des 30 derniers jours)
daniel cohen
daniel cohen le 3 Déc 2021
Commenté : daniel cohen le 3 Déc 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.

Réponse acceptée

Matt J
Matt J le 3 Déc 2021
Modifié(e) : Matt J le 3 Déc 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,[]).';

Plus de réponses (0)

Catégories

En savoir plus sur Resizing and Reshaping Matrices dans Help Center et File Exchange

Produits


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by