Adding matrix values into a string

17 次查看(过去 30 天)
Hello,
I want to turn a matrix
a=[1 2 3 4 5 6 7 8 9] for say
into a string with the three first values of the array
b=123;
Any ideas how to do it?

采纳的回答

KSSV
KSSV 2020-12-2
a=[1 2 3 4 5 6 7 8 9] ;
str = char(a+'0')
str = '123456789'

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Characters and Strings 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by