To display the maximum number of digits in a variable without using scientific notation, set the output display format to "longG":
After you set the display format, variables display in decimal notation:
m = rand(1,3)/1000
m =
0.000546881519204984 0.000957506835434298 0.00096488853519927
To avoid displaying scientific notation for variables that exceed 2^50 use "sprintf". For example, this code displays the number 2332456943534324 in decimal notation:
sprintf('%16.f',2332456943534324)
ans =
'2332456943534324'
For more information, see the "format" documentation:
0 件のコメント
サインインしてコメントする。