* format-- set command window output display format


the displayed number may not match the input number due to display format

default: 4 decimal

syntax:

format style

[[https://www.mathworks.com/help/matlab/ref/format.html][format]]

note:
Numeric formats affect only how numbers appear in Command Window output, not how MATLAB® computes or saves them.

matlab  code example

>> d=0.00125

d =

    0.0013

>> a=12.5

a =

   12.5000

>> format long
>> a=12.5

a =

  12.500000000000000

>> format
>> d=0.00125

d =

    0.0013

 

posted @ 2019-03-09 09:56  kaiming_ai  阅读(105)  评论(0编辑  收藏  举报