gistlib
You can get the value of pi in Matlab by calling the built-in constant pi. Here's an example:
pi
main.m>> pi ans = 3.1416 25 chars6 lines
>> pi ans = 3.1416
This will return the value of pi to the default precision, which is usually four decimal places.
gistlibby LogSnag