Borrar filtros
Borrar filtros

How to join the elements of char array?

1 visualización (últimos 30 días)
Kushal Khaitan
Kushal Khaitan el 31 de Mzo. de 2013
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.

Respuestas (1)

Andrei Bobrov
Andrei Bobrov el 31 de Mzo. de 2013
a=[61 62 63 64 65]
out = sprintf('%d',a)
  3 comentarios
Kushal Khaitan
Kushal Khaitan el 31 de Mzo. de 2013
i want to save it as one variable
Cedric
Cedric el 31 de Mzo. de 2013
Editada: Cedric el 31 de Mzo. de 2013
What is this out for you in the answer given by Andrei?
-> doc sprintf

Iniciar sesión para comentar.

Categorías

Más información sobre Characters and Strings en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by