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 日

0 投票

flip(sprintf('%d',4530),2)

3 件のコメント

Rajashree Annapillai
Rajashree Annapillai 2018 年 8 月 23 日
Thank you so much Sir. Can you please explain me how this syntax works sir.
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 件)

カテゴリ

Community Treasure Hunt

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

Start Hunting!

Translated by