how to convert character array to cell array

4 次查看(过去 30 天)
hello, i have a char array of size 1280 * 8 ... values like 11111111 01010101 10100101 ........ 01010101 Now i want as 1*10240 cell array (since 1280 * 8 =10240)...output must be 1,1,1,1,1,1,1,1,0,1,0,1,0,1,0,1.....i used str2num ..but they were being conatanated as vertical..i want to conctanate horizantally/..

采纳的回答

Stephen23
Stephen23 2017-7-25
num2cell(reshape(X.',1,[]))
  13 个评论
Stephen23
Stephen23 2017-7-25
编辑:Stephen23 2017-7-25
reshape(C,[512,20]).'
Because MATLAB is column-major, so matrix vectorization goes along the columns first.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Structures 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by