Create a MATLAB structure describing an unsigned fractional data type
a = ufrac(TotalBits)
a = ufrac(TotalBits, GuardBits)
ufrac(TotalBits) returns a MATLAB structure that describes the data type of an unsigned fractional number with a word size given by
ufrac(TotalBits, GuardBits) returns a MATLAB structure that describes the data type of an unsigned fractional number. The total word size is given by
GuardBits bits located to the left of the radix point.
ufrac is automatically called when an unsigned fractional data type is specified in a block dialog box.
The default radix point for this data type is assumed to lie immediately to the left of all bits. If guard bits are specified, then they lie to the left the default radix point.
Define an 8-bit unsigned fractional data type with 4 guard bits. Note that the range of this number is from 0 to (1 - 2-8).24 = 15.9375.
a = ufrac(8,4)