how to reverse an integer

4 Ansichten (letzte 30 Tage)
Rajashree Annapillai
Rajashree Annapillai am 23 Aug. 2018
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.

Akzeptierte Antwort

Andrei Bobrov
Andrei Bobrov am 23 Aug. 2018
flip(sprintf('%d',4530),2)
  3 Kommentare
Andrei Bobrov
Andrei Bobrov am 24 Aug. 2018
Bearbeitet: Andrei Bobrov am 24 Aug. 2018
Please read help for Matlab
Rajashree Annapillai
Rajashree Annapillai am 25 Aug. 2018
Ok sir,Thank you

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Data Import and Export finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by