How to Concatenate two large numbers in Matlab
조회 수: 4 (최근 30일)
이전 댓글 표시
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
댓글 수: 0
추가 답변 (2개)
Muruganandham Subramanian
2012년 11월 26일
a=10; b=20;
a1=num2str(a);
b1=num2str(b);
c=strcat(a1,b1)
댓글 수: 4
Muruganandham Subramanian
2012년 11월 26일
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..
참고 항목
카테고리
Help Center 및 File Exchange에서 Creating, Deleting, and Querying Graphics Objects에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!