Skip to Main Content Skip to Search
Product Documentation

float - Create MATLAB structure describing floating-point data type

Syntax

a = float('single')
a = float('double')

Description

float('single') returns a MATLAB structure that describes the data type of an IEEE single (32 total bits, 8 exponent bits).

float('double') returns a MATLAB structure that describes the data type of an IEEE double (64 total bits, 11 exponent bits).

float is automatically called when a floating-point number is specified in a block dialog box.

Examples

Define an IEEE single data type:

>> a = float('single')

a = 

    Class: 'SINGLE'

See Also

fixdt | sfix | sfrac | sint | ufix | ufrac | uint

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS