How to Concatenate two large numbers in Matlab
Mostrar comentarios más antiguos
Hello everyone, This could come as a very basic question. I'm trying to concate 2 large numbers. For example: 5602007248 and 5602007720. The answer should be 56020072485602007720.
Currently, i'm trying converting to str and using strcat then converting back to num, but that doesnt seem to work somehow.
Help really appreciated. Thanks Raj
Respuesta aceptada
Más respuestas (2)
Muruganandham Subramanian
el 26 de Nov. de 2012
0 votos
a=10; b=20;
a1=num2str(a);
b1=num2str(b);
c=strcat(a1,b1)
4 comentarios
Rajesh
el 26 de Nov. de 2012
Rajesh
el 26 de Nov. de 2012
Muruganandham Subramanian
el 26 de Nov. de 2012
It's working fing fine.. If you stil have a doubt you can compare by ur expected and caluculated by 'strcmp'.I have tried that too..
Rajesh
el 26 de Nov. de 2012
Categorías
Más información sobre Creating, Deleting, and Querying Graphics Objects 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!