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.

 Réponse acceptée

Andrei Bobrov
Andrei Bobrov le 23 Août 2018

0 votes

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

3 commentaires

Rajashree Annapillai
Rajashree Annapillai le 23 Août 2018
Thank you so much Sir. Can you please explain me how this syntax works sir.
Andrei Bobrov
Andrei Bobrov le 24 Août 2018
Modifié(e) : Andrei Bobrov le 24 Août 2018
Please read help for Matlab
Rajashree Annapillai
Rajashree Annapillai le 25 Août 2018
Ok sir,Thank you

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Data Import and Export dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by