Reshaping a matrix with binary numbers

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.

 採用された回答

Matt J
Matt J 2021 年 12 月 3 日
編集済み: Matt J 2021 年 12 月 3 日

0 投票

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,[]).';

その他の回答 (0 件)

カテゴリ

製品

リリース

R2020a

タグ

質問済み:

2021 年 12 月 3 日

コメント済み:

2021 年 12 月 3 日

Community Treasure Hunt

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

Start Hunting!

Translated by