Main Content

Simulink.ModelTransform.CommonSourceInterpolation.refactorModel

Replace Interpolation Using Prelookup blocks

Since R2021b

Description

refactorResults = Simulink.ModelTransform.CommonSourceInterpolation.refactorModel(transformResults) replaces the specified group of Interpolation Using Prelookup blocks and returns the refactored model.

refactorResults = Simulink.ModelTransform.CommonSourceInterpolation.refactorModel(transformResults, preferredModelName) uses the preferredModelName to save the refactored model.

Examples

collapse all

This example shows how to replace the identified Interpolation Using Prelookup blocks in a model and store the refactored model in the variable, refactorResults.

refactorResults = Simulink.ModelTransform.CommonSourceInterpolation.RefactorResults(transformResults)
refactorResults =

  RefactorResults with properties:

    ModelName: 'ex_interpolation_optimize'
      ModelDirectory: ''
    TraceabilityInfo: [4×1 containers.Map]

Input Arguments

collapse all

Identified group of redundant Interpolation Using Prelookup blocks, specified as a Simulink.ModelTransform.CommonSourceInterpolation.Results object.

Model name to use for the refactored model, specified as a character vector.

Output Arguments

collapse all

Refactored model, returned as a Simulink.ModelTransform.CommonSourceInterpolation.RefactorResults object.

Version History

Introduced in R2021b