Thirty-second quotation to decimal
Change the Price Quotation for a Bond or Bond Future From a Fraction
This example shows how to change the price quotation for a bond or bond future from a fraction with a denominator of 32 to a decimal, given two bonds that are quoted as 101-25 and 102-31.
InNumber = [101; 102]; InFraction = [25; 31]; OutNumber = thirtytwo2dec(InNumber, InFraction)
OutNumber = 2×1 101.7812 102.9688
InNumber — Input number
Input number, specified as a scalar or an
of integers representing price without the fractional components.
InFraction — Fractional portions of each element in
numeric decimal fraction
Fractional portions of each element in
specified as a scalar or an
of numeric decimal fractions.
Introduced before R2006a