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.

 Risposta accettata

Andrei Bobrov
Andrei Bobrov il 23 Ago 2018
flip(sprintf('%d',4530),2)

3 Commenti

Thank you so much Sir. Can you please explain me how this syntax works sir.
Andrei Bobrov
Andrei Bobrov il 24 Ago 2018
Modificato: Andrei Bobrov il 24 Ago 2018
Please read help for Matlab
Ok sir,Thank you

Accedi per commentare.

Più risposte (0)

Categorie

Community Treasure Hunt

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

Start Hunting!

Translated by