如何将某几列的数字合并为一个数。

如图,如何将第1行第2列,第1行第3列,第1行第1列的数字合并为一个数据。
如果数据为图片中,则最后输出结果应为123。

 採用された回答

yelmeros
yelmeros 2023 年 5 月 17 日

0 投票

先转成字符串,然后拼接字符串,最后将字符串转成数字。
str2num([num2str(a(2)), num2str(a(3)), num2str(a(1))]);
100*a(2) + 10*a(3) + a(1);

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange数据类型转换 についてさらに検索

質問済み:

2023 年 5 月 17 日

回答済み:

2023 年 5 月 17 日

Community Treasure Hunt

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

Start Hunting!