How to convert 1x64 uint64 to 1x1 array ?

1 次查看(过去 30 天)
hello there, I have a 1x64 array which i need to convert into 1x1 array
How to do that ?
  4 个评论
David Hill
David Hill 2021-11-22
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 2021-11-22
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

请先登录,再进行评论。

回答(1 个)

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

类别

Help CenterFile Exchange 中查找有关 Resizing and Reshaping Matrices 的更多信息

标签

产品


版本

R2016a

Community Treasure Hunt

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

Start Hunting!

Translated by