fipref
Set fixed-point preferences
Description
creates a default
P = fipreffipref object. The fipref object defines the display and
logging attributes for all fi objects.
creates a P = fipref(Name,Value)fipref object with properties specified by
Name,Value pairs.
Your fipref settings persist throughout your MATLAB® session. Use reset(fipref) to return to the default
settings during your session. Use savefipref to save your display
preferences for subsequent MATLAB sessions.
Examples
P = fipref
P =
NumberDisplay: 'RealWorldValue'
NumericTypeDisplay: 'full'
FimathDisplay: 'full'
LoggingMode: 'Off'
DataTypeOverride: 'ForceOff'
You can set properties of fipref objects at the time of object creation by including properties after the arguments of the fipref constructor function. For example, to set NumberDisplay to bin and NumericTypeDisplay to short.
P = fipref('NumberDisplay','bin','NumericTypeDisplay','short')
P =
NumberDisplay: 'bin'
NumericTypeDisplay: 'short'
FimathDisplay: 'full'
LoggingMode: 'Off'
DataTypeOverride: 'ForceOff'
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN, where Name is
the argument name and Value is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Before R2021a, use commas to separate each name and value, and enclose
Name in quotes.
Example: P =
fipref('NumberDisplay','RealWorldValue','NumericTypeDisplay','short');
Data Type Override Properties
Data type override options for fi objects, specified as the
comma-separated pair consisting of 'DataTypeOverride' and one of
these values:
'ForceOff'— No data type override'ScaledDoubles'— Override with scaled doubles'TrueDoubles'— Override with doubles'TrueSingles'— Override with singles
Data type override only occurs when the fi constructor function
is called.
Data Types: char
Data type override setting applicability to fi objects,
specified as the comma-separated pair consisting of
'DataTypeOverrideAppliesTo' and one of these values:
'AllNumericTypes'— Apply data type override to allfidata types. This setting does not override built-in integer types.'Fixed-Point'— Apply data type override only to fixed-point data types'Floating-Point'— Apply data type override only to floating-pointfidata types
DataTypeOverrideAppliesTo displays only if
DataTypeOverride is not set to
ForceOff.
Data Types: char
Display Properties
Display options for the local fimath attributes of a
fi object, specified as the comma-separated pair consisting of
'FimathDisplay' and one of these values:
'full'— Displays all of thefimathattributes of a fixed-point object'none'— None of thefimathattributes are displayed
Data Types: char
Display options for the values of a fi object, specified as the
comma-separated pair consisting of 'NumberDisplay' and one of these values:
'bin'— Displays the stored integer value in binary format'dec'— Displays the stored integer value in unsigned decimal format'RealWorldValue'— Displays the stored integer value in the format specified by the MATLABformatfunctionfiobjects inratformat are displayed according to'hex'— Displays the stored integer value in hexadecimal format'int'— Displays the stored integer value in signed decimal format'none'— No value is displayed
The stored integer value does not change when you change the
fipref object. The fipref object only affects the
display.
Data Types: char
Display options for the numerictype attributes of a
fi object, specified as the comma-separated pair consisting of
'NumericTypeDisplay' and one of these values:
'full'— Displays all of thenumerictypeattributes of afiobject'none'— None of thenumerictypeattributes are displayed'short'— Displays thenumerictypeattributes of afiobject using the abbreviated notation of thenumerictypeconstructor
Data Types: char
Logging Properties
Logging options for operations performed on fi objects,
specified as the comma-separated pair consisting of 'LoggingMode'
and one of these values:
'off'— No logging'on'— Information is logged for future operations
Overflows and underflows for assignment, plus, minus, and multiplication
operations are logged as warnings when LoggingMode is set to
on.
When LoggingMode is on, you can also use the
following functions to return logged information about assignment and creation
operations to the MATLAB command line:
maxlog— Returns the maximum real-world valueminlog— Returns the minimum valuenoverflows— Returns the number of overflowsnunderflows— Returns the number of underflows
LoggingMode must be set to on before you
perform any operation in order to log information about it. To clear the log, use the
function resetlog.
Data Types: char
Version History
Introduced before R2006a
See Also
fi | fimath | numerictype | quantizer | savefipref
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)