如何让fprintf显示更高的精度?

时间:2013-04-25 15:23:10

标签: matlab printf

我正在尝试使用以下fprintf代码

      n
      m
     fprintf('The minimum value of the modulus of the image of C_r is %d \n\nThe correspoding point is at %d \n\n',m,n)

我得到了结果

  n =

  3.632213809443102 + 3.680287679864827i


m =

   5.170831128945713

The minimum value of the modulus of the image of C_r is 5.170831e+000 

The correspoding point is at        3.632214e+000 

我分别打印了n和m的值,以显示我希望它们如何出来 - 如何让fprintf以更高的精度显示数字?我尝试更改%d条款,但无济于事

1 个答案:

答案 0 :(得分:3)

怎么样

fprintf( '%.15f\n', m );

打印15位数