reshape 8bit matrix to 16 bit matrix

3 visualizaciones (últimos 30 días)
Houssam
Houssam el 22 de Mayo de 2021
Respondida: Matt J el 22 de Mayo de 2021
Hi Community
I have a matrix sized 1024 * 512 of 8 bit elements
and i need to convert it to a matrix of 512 * 512 of 16 bit elements
i tried reshape but it doesn't work !!!
eg:
thid matrix :
16 16 32 32
48 48 64 64
will becom
4112 8224
12336 16448
any one can help me pleaze

Respuestas (1)

Matt J
Matt J el 22 de Mayo de 2021
A=[16 16 32 32
48 48 64 64];
B= A(:,1:2:end)*256 + A(:,2:2:end)
B = 2×2
4112 8224 12336 16448

Categorías

Más información sobre Creating and Concatenating Matrices en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by