storing matrix elements in a single variable as string
이전 댓글 표시
Hello!
I want to join the multiple int from the matrix and save them as a string. Let us say I have a matrix A.
A = [3 25 100 5 20 100];
I want to store these values in B as following
B=("3#25@100","5#20@100")
Thanks in advance.
채택된 답변
추가 답변 (1개)
A = [3,25,100,5,20,100];
S = compose("%d#%d@%d",A)
카테고리
도움말 센터 및 File Exchange에서 Characters and Strings에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!