how to convert integer array to one value??
古いコメントを表示
hi , i want to convert array such as x=[1;2;3;4;5] to one value as y=12345
採用された回答
その他の回答 (1 件)
Hey,
You can also use another (more mathematical) approach:
x = [1;2;3;4;5];
y = 0;
for i = 1:length(x)
y = y + (10^(i-1))*x(length(x)+1-i);
end
Greets
カテゴリ
ヘルプ センター および File Exchange で Data Type Conversion についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!