本页面提供的是上一版软件的文档。当前版本中已删除对应的英文页面。

MATLAB 中的定点基础知识

定点数和半精度数、定标、转换、精度、算术运算

要在 MATLAB® 中将定点数据类型赋给的数字或变量,请使用 fi 对象。在 fi 构造函数中,可以指定其他数值类型属性(如字长和小数长度),以及用于控制定点数据算术的各项属性。

函数

全部展开

fiConstruct fixed-point numeric object
ufiConstruct unsigned fixed-point numeric object
sfiConstruct signed fixed-point numeric object
fimathSet fixed-point math settings
fiprefSet fixed-point preferences
numerictypeConstruct an embedded.numerictype object describing fixed-point or floating-point data type
accumposAdd two fi objects or values
accumnegSubtract two fi objects or values
quantizeQuantize fixed-point numbers
binUnsigned binary representation of stored integer of fi object
decUnsigned decimal representation of stored integer of fi object
doubleDouble-precision floating-point real-world value of fi object
hexHexadecimal representation of stored integer of fi object
removefimathRemove fimath object from fi object
setfimathAttach fimath object to fi object
globalfimathConfigure global fimath and return handle object
removeglobalfimathprefRemove global fimath preference
resetglobalfimathSet global fimath to MATLAB factory default
storedIntegerStored integer value of fi object
storedIntegerToDoubleConvert stored integer value of fi object to built-in double value
halfConstruct half-precision numeric object
pow10Base 10 power and scale half-precision numbers
rsqrtReciprocal square root
fmaMultiply and add using fused multiply add approach

embedded.fiFixed-point numeric object
embedded.fimathfimath object
embedded.numerictypenumerictype object

主题

Ways to Construct fi Objects

Teaches you how to create fi objects

Set Up Fixed-Point Objects

Basic information on using fi objects

Cast fi Objects

Shows you how to cast fi objects

Compute Slope and Bias

Describes slope-bias scaling and how to compute it

fi Object Properties

Tells you how to find more information about the properties associated with fi objects, and shows you how to set these properties

fi Objects and C Integer Data Types

Compares ANSI C integer data type ranges, conversions, and exception handling with those of fi objects

fi Object Display Preferences Using fipref

Gives examples of using fipref objects to set display preferences for fi objects

Underflow and Overflow Logging Using fipref

Gives examples of using fipref objects to set logging preferences for fi objects

Data Type Override Preferences Using fipref

Describes how to use the fipref object to perform data type override

fi Objects with Simulink

Describes the ways you can use Fixed-Point Designer™ fi objects with Simulink® models

fi Objects with DSP System Toolbox

Describes how to pass fixed-point data back and forth between the MATLAB workspace and Simulink models using DSP System Toolbox™ blocks

疑难解答

What is the Difference Between Fixed-Point and Built-in Integer Types?

Explains the difference between fixed-point data types and built-in integer data types in MATLAB.

Negative Fraction Length

A negative fraction length occurs when the input value of a fi object contains trailing zeros.

Fraction Length Greater Than Word Length

A fraction length greater than the word length of a fixed-point number occurs when the number has an absolute value less than one and contains leading zeros.

特色示例