Products & Services Solutions Academia Support User Community Company

Learn more about Financial Toolbox   

toquoted - Decimal to fractional conversion

Syntax

quote = toquoted(usddec, fracpart)

Description

quote = toquoted(usddec, fracpart) returns the fractional equivalent, quote, of the decimal figure, usddec, based on the fractional base (denominator), fracpart. The fractional bases are the ones used for quoting equity prices in the United States (denominator 2, 4, 8, 16, or 32). If fracpart is not entered, the denominator 32 is assumed.

Examples

A United States equity price in decimal form is 101.625. To convert this to fractional form in eighths of a dollar:

quote = toquoted(101.625, 8)

quote =
        101.05

The answer is interpreted as 101 5/8.

See Also

todecimal

  


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-2010- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS