MATLAB Examples

Using the Float Typecast Block

This example shows how you can use the Float Typecast block to extract the sign, exponent, and mantissa bits from a floating-point input, and then convert the bits back to a floating-point output after performing any computations.

Open this model. The model multiplies the floating-point input by two to produce the floating-point output. To multiply the input, the algorithm increments the exponent by one.