| Symbolic Math Toolbox™ | ![]() |
R = vpa(A)
R = vpa(A,d)
R = vpa(A) uses variable-precision arithmetic (VPA) to compute each element of A to d decimal digits of accuracy, where d is the current setting of digits. Each element of the result is a symbolic expression.
R = vpa(A,d) uses d digits, instead of the current setting of digits.
The statements
digits(25)
q = vpa(sin(sym('pi')/6))
p = vpa(pi)
w = vpa('(1+sqrt(5))/2')return
q = 0.5 p = 3.141592653589793238462643 w = 1.618033988749894848204587
vpa pi 75 computes π to 75 digits.
The statements
A = vpa(hilb(2),25) B = vpa(hilb(2),5)
return
A = [ 1.0, 0.5] [ 0.5, 0.3333333333333333333333333] B = [ 1.0, 0.5] [ 0.5, 0.33333]
![]() | uint8, uint16, uint32, uint64 | zeta | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |