Split array values into 2 elements
Mostrar comentarios más antiguos
A = [126126,138154,137146]
Output i want is A = [126,126,138,154,137,146]
2 comentarios
José-Luis
el 5 de Dic. de 2012
Praveen, please accept answers if they help you. I have looked at your question history and you never seem to do that.
Respuesta aceptada
Más respuestas (2)
Azzi Abdelmalek
el 5 de Dic. de 2012
Editada: Azzi Abdelmalek
el 5 de Dic. de 2012
out=str2num(reshape(num2str(A')',3,[])')'
1 comentario
sp
el 5 de Dic. de 2012
Steve
el 5 de Dic. de 2012
0 votos
The function you want is reshape:
A = reshape(A, 1, [])
This gives you the output you want (A = [126,126,138,154,137,146])
Categorías
Más información sobre Numbers and Precision en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!