How to append several elements to a single element in an array?
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Patrick Ellison
el 31 de En. de 2018
I have an array like:
A = [1 2 3 4 5 6 7 8 9 10];
I want to merge all the elements into a single element, like:
A = [12345678910];
but I cannot see any clear way to do so, as functions like 'reshape' or 'horizcat' simple place all the elements vertically, instead of appending all the values into one long element.
Any help would be really appreciated!
Thanks.
1 comentario
Stephen23
el 31 de En. de 2018
Note to others: see my answer if you want a simpler, faster solution.
Respuesta aceptada
Ver también
Categorías
Más información sobre Characters and Strings en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!