Filter löschen
Filter löschen

how to convert character array to cell array

1 Ansicht (letzte 30 Tage)
Jyothi Alugolu
Jyothi Alugolu am 25 Jul. 2017
Kommentiert: Jyothi Alugolu am 26 Jul. 2017
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/..

Akzeptierte Antwort

Stephen23
Stephen23 am 25 Jul. 2017
num2cell(reshape(X.',1,[]))
  13 Kommentare
Stephen23
Stephen23 am 25 Jul. 2017
Bearbeitet: Stephen23 am 25 Jul. 2017
reshape(C,[512,20]).'
Because MATLAB is column-major, so matrix vectorization goes along the columns first.
Jyothi Alugolu
Jyothi Alugolu am 26 Jul. 2017
yeah ok..i got it..thank you soo much..

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Structures finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by