Documentation

This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

dec

Unsigned decimal representation of stored integer of fi object

Syntax

dec(a)

Description

dec(a) returns the stored integer of fi object a in unsigned decimal format as a character vector. dec(a) is equivalent to a.dec.

Fixed-point numbers can be represented as

real-world value=2fraction length×stored integer

or, equivalently as

real-world value=(slope×stored integer)+bias

The stored integer is the raw binary number, in which the binary point is assumed to be at the far right of the word.

Examples

The code

a = fi([-1 1],1,8,7);
y = dec(a)
z = a.dec

returns

y =

		128   127


z =

		128   127

See Also

| | | |

Introduced before R2006a

Was this topic helpful?