Main Content


Replace Interpolation Using Prelookup blocks


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.


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_model_transformer'
      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.

Introduced in R2021b