用Matlab避免科学记数法

时间:2013-03-19 23:29:23

标签: matlab scientific-notation

我已经尝试过了:

format long g;

但是这样的数字用科学记数法表示:

ans = 8.80173259769825e-05

如果不使用像fprintf之类的东西,我怎样才能避免科学记数法?

2 个答案:

答案 0 :(得分:5)

你可以使用:

sprintf('%.10f', yourNumber)

或者更复杂的选择是使用基于Java的格式(see more info,Yair Altman用于显示此方法),例如:

char(java.text.DecimalFormat('#.00000000').format(yourNumber));

答案 1 :(得分:1)

转到: 偏好>命令视图>数字格式>银行

相关问题