2020/06/25

Matlab: Show more decimal points for a variable

To show more digits with Matlab, use digits() and vpa()

>> a = 1/3

a =

    0.3333

>> digits(6)
>> vpa(a)

ans =

0.333333

>> digits(10)
>> vpa(a)

ans =

0.3333333333

Reference:

digits (MathWorks)

沒有留言:

張貼留言