To calculate ten digits of pi in MATLAB, use the vpa
function with 10 as its input argument to set the desired number of digits:
main.m182 chars5 lines
The output of this code will display the value of pi with 10 digits of precision:
main.m12 chars2 lines
gistlibby LogSnag