Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

frac2cur

Fractional currency value to decimal value

Syntax

  • Decimal = frac2cur(Fraction,Denominator)
    example

Description

example

Decimal = frac2cur(Fraction,Denominator) converts a fractional currency value to a decimal value. Fraction is the fractional currency value input as a character vector, and Denominator is the denominator of the fraction.

Examples

collapse all

This example shows how to convert a fractional currency value to a decimal value.

Decimal = frac2cur('12.1', 8)
Decimal =

   12.1250

Related Examples

Input Arguments

collapse all

Fractional currency values, specified as a character vector or cell array of character vectors.

Data Types: char | cell

Denominator of the fractions, specified as a scalar or vector using numeric values for the denominator.

Data Types: double

Output Arguments

collapse all

Decimal currency value, returned as a scalar or vector with numeric decimal values.

Data Types: double

See Also

|

Introduced before R2006a

Was this topic helpful?