getAlgorithmParameters
Examine algorithm parameter settings for lookup table function code replacement table entry
Description
returns
the algorithm parameter settings for the lookup table function identified
in the code replacement table entry algParams
= getAlgorithmParameters(tableEntry
)tableEntry
.
If you call getAlgorithmParameters
before using setAlgorithmParameters
, getAlgorithmParameters
lists
the default parameter settings for the lookup table function.
Examples
Examine Default Parameter Settings for prelookup
Table Entry
Create a code replacement table.
crTable = RTW.TflTable;
Create a table entry for a function.
tableEntry = RTW.TflCFunctionEntry;
Identify the table entry as an entry for the prelookup
function.
setTflCFunctionEntryParameters(tableEntry, ... 'Key', 'prelookup', ... 'Priority', 100, ... 'ImplementationName', 'myPrelookup');
Get the algorithm parameter settings for the prelookup
function
table entry.
algParams = getAlgorithmParameters(tableEntry)
algParams = Prelookup with properties: ExtrapMethod: [1x1 coder.algorithm.parameter.ExtrapMethod] RndMeth: [1x1 coder.algorithm.parameter.RndMeth] IndexSearchMethod: [1x1 coder.algorithm.parameter.IndexSearchMethod] UseLastBreakpoint: [1x1 coder.algorithm.parameter.UseLastBreakpoint] RemoveProtectionInput: [1x1 coder.algorithm.parameter.RemoveProtectionInput]
Examine the information for parameter ExtrapMethod
.
algParams.ExtrapMethod
ans = ExtrapMethod with properties: Name: 'ExtrapMethod' Options: {'Linear' 'Clip'} Primary: 1 Value: {'Linear'}
Examine the information for parameter RndMeth
.
algParams.RndMeth
ans = RndMeth with properties: Name: 'RndMeth' Options: {1x7 cell} Primary: 0 Value: {1x7 cell}
Examine the current Value
setting.
algParams.RndMeth.Value
ans = Columns 1 through 6 'Ceiling' 'Convergent' 'Floor' 'Nearest' 'Round' 'Simplest' Column 7 'Zero'
Examine the information for parameter IndexSearchMethod
.
algParams.IndexSearchMethod
ans = IndexSearchMethod with properties: Name: 'IndexSearchMethod' Options: {'Linear search' 'Binary search' 'Evenly spaced points'} Primary: 0 Value: {'Binary search' 'Evenly spaced points' 'Linear search'}
Examine the information for parameter UseLastBreakpoint
.
algParams.UseLastBreakpoint
ans = UseLastBreakpoint with properties: Name: 'UseLastBreakpoint' Options: {'off' 'on'} Primary: 0 Value: {'off' 'on'}
Examine the information for parameter RemoveProtectionInput
.
algParams.RemoveProtectionInput
ans = RemoveProtectionInput with properties: Name: 'RemoveProtectionInput' Options: {'off' 'on'} Primary: 0 Value: {'off' 'on'}
Examine Modified Parameter Setting for lookup2D
Table Entry
Create a code replacement table.
crTable = RTW.TflTable;
Create a table entry for a function.
tableEntry = RTW.TflCFunctionEntry;
Identify the table entry as an entry for the lookup2D
function.
setTflCFunctionEntryParameters(tableEntry, ... 'Key', 'lookup2D', ... 'Priority', 100, ... 'ImplementationName', 'myLookup2D');
Get the algorithm parameter settings for the lookup2D
function
table entry.
algParams = getAlgorithmParameters(tableEntry)
algParams = Lookup with properties: InterpMethod: [1×1 coder.algorithm.parameter.InterpMethod] ExtrapMethod: [1×1 coder.algorithm.parameter.ExtrapMethod] UseRowMajorAlgorithm: [1×1 coder.algorithm.parameter.UseRowMajorAlgorithm] RndMeth: [1×1 coder.algorithm.parameter.RndMeth] IndexSearchMethod: [1×1 coder.algorithm.parameter.IndexSearchMethod] UseLastTableValue: [1×1 coder.algorithm.parameter.UseLastTableValue] ApplyFullPrecisionForLinearInterpolation: [1×1 coder.algorithm.parameter.ApplyFullPrecisionForLinearInterpolation] RemoveProtectionInput: [1×1 coder.algorithm.parameter.RemoveProtectionInput] SaturateOnIntegerOverflow: [1×1 coder.algorithm.parameter.SaturateOnIntegerOverflow] SupportTunableTableSize: [1×1 coder.algorithm.parameter.SupportTunableTableSize] BPPower2Spacing: [1×1 coder.algorithm.parameter.BPPower2Spacing] BeginIndexSearchUsingPreviousIndexResult: [1×1 coder.algorithm.parameter.BeginIndexSearchUsingPreviousIndexResult]
Display the possible index search method settings.
algParams.IndexSearchMethod.Options
ans = 'Linear search' 'Binary search' 'Evenly spaced points'
Display the current index search method setting.
algParams.IndexSearchMethod.Value
ans = 'Linear search' 'Binary search' 'Evenly spaced points'
By default, the parameter is set to the same value set.
Set the index search method to binary search.
algParams.IndexSearchMethod = 'Binary search';
Verify the modified parameter setting.
algParams.IndexSearchMethod.Value
ans = 'Binary search'
Input Arguments
tableEntry
— Code replacement table entry for a lookup table function
object
Code replacement table entry that you previously created and
represents a potential code replacement for a lookup table function.
The entry must identify the lookup table function for which you are
calling getAlgorithmParameters
.
Create the entry. For example, call the function
RTW.TflCFunctionEntry
.tableEntry = RTW.TflCFunctionEntry;
Specify the name of the lookup table function for which you created the entry. Use the
Key
parameter in a call tosetTflCFunctionEntryParameters
. The following function call specifies the lookup table functionprelookup
.setTflCFunctionEntryParameters(tableEntry, ... 'Key', 'prelookup', ... 'Priority', 100, ... 'ImplementationName', 'myPrelookup');
Output Arguments
algParams
— Algorithm parameter settings for a lookup table function
object
Algorithm parameter settings for the lookup table function identified
with the Key
parameter in tableEntry
.
Version History
Introduced in R2015a
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)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)