Main Content

FunctionApproximation.LUTMemoryUsageCalculator class

Package: FunctionApproximation

Calculate memory used by lookup table blocks in a system

Description

The FunctionApproximation.LUTMemoryUsageCalculator class helps to calculate the memory used by each lookup table block, including 1-D Lookup Table, 2-D Lookup Table, and n-D Lookup Table, used in a model.

Construction

calculator = FunctionApproximation.LUTMemoryUsageCalculator() creates a FunctionApproximation.LUTMemoryUsageCalculator object. Use the lutmemoryusage method to calculate the memory used by each lookup table block in a model.

Properties

expand all

Public Properties

Options for finding lookup table blocks in a system, specified as a Simulink.FindOptions object.

Methods

lutmemoryusageCalculate memory used by lookup table blocks in a system

Copy Semantics

Handle. To learn how handle classes affect copy operations, see Copying Objects.

Examples

collapse all

Use the FunctionApproximation.LUTMemoryUsageCalculator class to calculate the total memory used by lookup table blocks in a model.

Create a FunctionApproximation.LUTMemoryUsageCalculator object.

calculator = FunctionApproximation.LUTMemoryUsageCalculator

Use the lutmemoryusage method to get the memory used by each lookup table block in the sldemo_fuelsys model.

load_system('sldemo_fuelsys')
lutmemoryusage(calculator, 'sldemo_fuelsys')
ans =

  5×2 table

                                                    BlockPath                                               MemoryUsage
         _______________________________________________________________________________________________    ___________

    1    "sldemo_fuelsys/fuel_rate_control/airflow_calc/Pumping Constant"                                      1516    
    2    "sldemo_fuelsys/fuel_rate_control/control_logic/Throttle.throttle_estimate/Throttle Estimation"       1516    
    3    "sldemo_fuelsys/fuel_rate_control/control_logic/Speed.speed_estimate/Speed Estimation"                1436    
    4    "sldemo_fuelsys/fuel_rate_control/control_logic/Pressure.map_estimate/Pressure Estimation"            1364    
    5    "sldemo_fuelsys/fuel_rate_control/airflow_calc/Ramp Rate Ki"                                           192    
Introduced in R2018a