merge values of a vector

2 ビュー (過去 30 日間)
Felix Florath
Felix Florath 2020 年 1 月 19 日
コメント済み: Felix Florath 2020 年 1 月 19 日
Hey matlab community,
I want to merge the values of a vector to a single scalar. So for example i have the vector z = (1,2,3,4). The final value should be 1234.
Thanks in advance

採用された回答

Akira Agata
Akira Agata 2020 年 1 月 19 日
Like this?
x = 1:4; % sample input array
s = num2str(x,'%d');
y = str2double(s);
>> y
y =
1234
  1 件のコメント
Felix Florath
Felix Florath 2020 年 1 月 19 日
Awsome, it works exactly as i needed. Thank you

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

その他の回答 (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