필터 지우기
필터 지우기

Reshaping a matrix with binary numbers

조회 수: 2 (최근 30일)
daniel cohen
daniel cohen 2021년 12월 3일
댓글: daniel cohen 2021년 12월 3일
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일
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개)

카테고리

Help CenterFile Exchange에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기

태그

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by