how to reverse an integer

조회 수: 4 (최근 30일)
Rajashree Annapillai
Rajashree Annapillai 2018년 8월 23일
댓글: Rajashree Annapillai 2018년 8월 25일
Hi,I have to reverse a number.Ex.4530 .I have to print this number as 0354 and not as 354.Is there any way to print the number including '0' also.Please help!Thank you.

채택된 답변

Andrei Bobrov
Andrei Bobrov 2018년 8월 23일
flip(sprintf('%d',4530),2)
  댓글 수: 3
Andrei Bobrov
Andrei Bobrov 2018년 8월 24일
편집: Andrei Bobrov 2018년 8월 24일
Please read help for Matlab
Rajashree Annapillai
Rajashree Annapillai 2018년 8월 25일
Ok sir,Thank you

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Import and Export에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by