Graphics Reference
In-Depth Information
>> format long g; 174/13
years =
13.3846153846154
>> format short g; 174/13
years =
13.385
>> format bank; 174/13
years =
13.38
>> format hex; 174/13
years =
402ac4ec4ec4ec4f
Now we will see examples of the calculation of the value of the sqrt (17) with the number of decimal places and
precision that we desire:
>> vpa ' 174/13 ' 10
years =
13.38461538
>> vpa ' 174/13 ' 15
years =
13.3846153846154
>> digits (20); VPA ' 174/13 '
years =
13.384615384615384615
A.3 Integer Numbers
In MATLAB all common operations with integer numbers are accurately, regardless of the size of the output of the
result. If we want the result of an operation to appear on screen with a certain number of exact figures, we use the
command of symbolic computation vpa ( variable precision arithmetic ), whose syntax we already know.
 
Search WWH ::




Custom Search