How to join the elements of char array?

I have an array with size not fixed depends on the inputs from the user. It is eg. 8X2 char array. I want to combine the array in 1 string.
eg. If it consists 61 62 63 64 65
I want a string of the form "6162636465"
Plz help as soon as possible.

Antworten (1)

Andrei Bobrov
Andrei Bobrov am 31 Mär. 2013

1 Stimme

a=[61 62 63 64 65]
out = sprintf('%d',a)

3 Kommentare

Kushal Khaitan
Kushal Khaitan am 31 Mär. 2013
not useful
Kushal Khaitan
Kushal Khaitan am 31 Mär. 2013
i want to save it as one variable
Cedric
Cedric am 31 Mär. 2013
Bearbeitet: Cedric am 31 Mär. 2013
What is this out for you in the answer given by Andrei?
-> doc sprintf

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Characters and Strings finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 31 Mär. 2013

Community Treasure Hunt

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

Start Hunting!

Translated by