Table combine cases across columns
5 ビュー (過去 30 日間)
古いコメントを表示
Hello,
I have a table with the example values below:
prev1 prev2 prev3
0 0 0
1 0 0
1 1 0
2 1 1
1 2 1
2 1 2
2 2 1
2 2 2
2 2 2
1 2 2
I am looking to combine the cases across columns to make a new column that will now have values like this:
000
100
110
211
121
212
221
222
122
Any thoughts?
0 件のコメント
採用された回答
dpb
2015 年 1 月 8 日
>> num2str(x.','%1d').'
ans =
000
100
110
211
121
212
221
222
222
122
>> whos ans
Name Size Bytes Class Attributes
ans 10x3 60 char
>>
returns a character array of length(x), each row of which is the desired string representation.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Numeric Types についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!