How to convert 1x64 uint64 to 1x1 array ?

1 visualización (últimos 30 días)
Muhammad Abdulrazek
Muhammad Abdulrazek el 22 de Nov. de 2021
Respondida: David Hill el 22 de Nov. de 2021
hello there, I have a 1x64 array which i need to convert into 1x1 array
How to do that ?
  4 comentarios
David Hill
David Hill el 22 de Nov. de 2021
An example of what you have as input and what you want for the output would be helpful. I am having a hard time understanding your question.
Muhammad Abdulrazek
Muhammad Abdulrazek el 22 de Nov. de 2021
the input is a normal grey scale image 128x128 uint8
1 ) i extracted one row from it 1x128
2) splitted this row into two equal halfs 1x64 note : every element has 3 bits in it
3) the output should be one string which have 192="64x3" char in it

Iniciar sesión para comentar.

Respuestas (1)

David Hill
David Hill el 22 de Nov. de 2021
a=randi(8,64,1)-1;
n=dec2bin(a,3);

Categorías

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

Etiquetas

Productos


Versión

R2016a

Community Treasure Hunt

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

Start Hunting!

Translated by