フィルターのクリア

Form strings/numbers from matrix

2 ビュー (過去 30 日間)
Natialol
Natialol 2013 年 3 月 31 日
Hello,
Looking for a way to join the horizontal elements of a matrix into a number.
[1 2 0; 0 2 6; 9 8 0; 0 0 2] to form [120; 026; 980; 002]
or {120,026,980,002}
Thanks

採用された回答

Cedric
Cedric 2013 年 3 月 31 日
編集済み: Cedric 2013 年 3 月 31 日
If you want numbers:
>> A = [1 2 0; 0 2 6; 9 8 0; 0 0 2]
A =
1 2 0
0 2 6
9 8 0
0 0 2
>> A * [100;10;1]
ans =
120
26
980
2
and you can convert to string from there if needed.
  1 件のコメント
Natialol
Natialol 2013 年 3 月 31 日
Thanks

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeData Type Conversion についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by