Convert cell to matrix
3 ビュー (過去 30 日間)
古いコメントを表示
採用された回答
Jan
2022 年 10 月 16 日
編集済み: Jan
2022 年 10 月 16 日
C = {'00000000', '00000010', '00000011'};
D = cat(1, C{:}); % Convert to matrix of type CHAR
E = D - '0' % Convert to double matrix
Subtracting CHAR values from each other converts them do their ASCII values:
double('01')
double('1') - double('0') is treated exactly as '1' - '0'.
その他の回答 (1 件)
Walter Roberson
2022 年 10 月 16 日
編集済み: Walter Roberson
2022 年 10 月 16 日
C = {'00000000', '00000010', '00000011'};
E = char(C) - '0'
参考
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!