MATLAB Answers

0

could anyone help me how to display 1 as 1.0000

Asked by jaah navi on 6 Aug 2019 at 8:29
Latest activity Commented on by Adam
on 6 Aug 2019 at 9:24
i want to display the round number with decimal value 0.
I am having number 1.I want to display it as 1.0000(adding four decimal zeros)
could anyone please help me on it.

  1 Comment

Adam
on 6 Aug 2019 at 9:24
Display it where? On command line or on a GUI or somewhere else?
doc sprintf
should do that if you just want to view a specific instance, e.g.
x = 1;
sprintf( '%.4f', x )
but it depends entirely where you want it and for what purpose.

Sign in to comment.

0 Answers