merge values of a vector
조회 수: 5 (최근 30일)
이전 댓글 표시
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
댓글 수: 0
채택된 답변
Akira Agata
2020년 1월 19일
Like this?
x = 1:4; % sample input array
s = num2str(x,'%d');
y = str2double(s);
>> y
y =
1234
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Type Conversion에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!