usddec = todecimal(quote)
returns the decimal equivalent, usddec, of a security whose price
is normally quoted as a whole number and a fraction (quote).
usddec = todecimal(___,fracpart)
returns the decimal equivalent, usddec, of a security whose price
is normally quoted as a whole number and a fraction (quote).
fracpart indicates the fractional base (denominator) with which
the security is normally quoted (default = 32).
Often secuirty prices are quoted in fractional form based on a denominator of 32. For example, if you see the quoted price is 100:05 it means 100 5/32. To find the equivalent decimal value, enter:
usddec = todecimal(100.05)
usddec =
100.1562
You can change the defualt denominator of 32 by using the fracpart optional argument with a value of 16.
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.