How to convert 1x64 uint64 to 1x1 array ?

1 view (last 30 days)
Muhammad Abdulrazek
Muhammad Abdulrazek on 22 Nov 2021
Answered: David Hill on 22 Nov 2021
hello there, I have a 1x64 array which i need to convert into 1x1 array
How to do that ?
  4 Comments
David Hill
David Hill on 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 on 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

Sign in to comment.

Answers (1)

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

Categories

Find more on Resizing and Reshaping Matrices in Help Center and File Exchange

Products


Release

R2016a

Community Treasure Hunt

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

Start Hunting!