主要内容

本页采用了机器翻译。点击此处可查看英文原文。

Simulink.ModelTransform.CommonSourceInterpolation.identifyCandidates

识别符合条件的 Interpolation Using Prelookup 块以进行转换

自 R2021b 起

说明

transformResults = Simulink.ModelTransform.CommonSourceInterpolation.identifyCandidates(model) 返回模型转换器可以转换的 Interpolation Using Prelookup 块,这些块是指定的 model

transformResults = Simulink.ModelTransform.CommonSourceInterpolation.identifyCandidates(model,skipLibraryBlocks) 还指定是否忽略库块。

示例

示例

全部折叠

本示例展示了如何搜索模型中符合条件的 Interpolation Using Prelookup 块并存储结果。将模型 ex_interpolation_optimize 保存到当前工作文件夹中。

openExample('ex_interpolation_optimize')
transformResults = Simulink.ModelTransform.CommonSourceInterpolation.identifyCandidates('ex_interpolation_optimize')
transformResults =

  Results with properties:

    Candidates: [1×1 struct]

transformResults.Candidates = 

  struct with fields:

        InterpolationPorts: [4×1 struct]
               SwitchPorts: [4×1 struct]

输入参数

全部折叠

模型名称,指定为字符向量。

可选择跳过转换的库块,指定为数值或逻辑 1 (true) 或 0 (false)。

输出参量

全部折叠

已识别冗余的 Interpolation Using Prelookup 块,并以 Simulink.ModelTransform.CommonSourceInterpolation.Results 对象的形式返回。

版本历史记录

在 R2021b 中推出