how to reverse an integer

2 次查看(过去 30 天)
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

请先登录,再进行评论。

更多回答(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