Products & Services Solutions Academia Support User Community Company

Learn more about Simulink   

sfix - Create MATLAB structure describing signed generalized fixed-point data type

Syntax

a = sfix(TotalBits)

Description

sfix(TotalBits) returns a MATLAB structure that describes the data type of a signed generalized fixed-point number with a word size given by TotalBits.

sfix is automatically called when a signed generalized fixed-point data type is specified in a block dialog box.

Examples

Define a 16-bit signed generalized fixed-point data type:

a = sfix(16)
a = 
       Class: 'FIX'
    IsSigned: 1
    MantBits: 16

See Also

fixdt, float, 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-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS