How to convert 1x64 uint64 to 1x1 array ?

1 Ansicht (letzte 30 Tage)
Muhammad Abdulrazek
Muhammad Abdulrazek am 22 Nov. 2021
Beantwortet: David Hill am 22 Nov. 2021
hello there, I have a 1x64 array which i need to convert into 1x1 array
How to do that ?
  4 Kommentare
David Hill
David Hill am 22 Nov. 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 am 22 Nov. 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

Melden Sie sich an, um zu kommentieren.

Antworten (1)

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

Kategorien

Mehr zu Resizing and Reshaping Matrices finden Sie in Help Center und File Exchange

Produkte


Version

R2016a

Community Treasure Hunt

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

Start Hunting!

Translated by