Products & Services Solutions Academia Support User Community Company

Learn more about Financial Toolbox   

todecimal - Fractional to decimal conversion

Syntax

usddec = todecimal(quote, fracpart)

Description

usddec = todecimal(quote, 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).

Examples

In the Wall Street Journal, bond 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.1563
usddec = todecimal(97.04, 16)

usddec =
   97.2500

See Also

toquoted

  


Free Interactive Computational Finance CD

View demos and recorded presentations led by industry experts.

Now On Demand
Network with industry peers and learn the latest applications of the leading software product for computational finance.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS