Hauptinhalt

convertToCell

R2026b

Convert block path to cell array of character vectors

Description

cellarray = convertToCell(bp) converts a block path to a cell array of character vectors.

example

Examples

collapse all

Suppose you have a Simulink.BlockPath object named bp that represents a Model block in a model hierarchy.

Create a cell array that represents the elements of the block path specified by bp.

cellarray = convertToCell(bp)
cellarray =

  3×1 cell array

    {'sldemo_mdlref_depgraph/thermostat'         }
    {'sldemo_mdlref_heater/Fahrenheit to Celsius'}
    {'sldemo_mdlref_F2C/Gain1'                   }

For information on how to create a Simulink.BlockPath object, see Simulink.BlockPath.

Input Arguments

collapse all

Fully specified block path, specified as a Simulink.BlockPath or Simulink.SimulationData.BlockPath object. This block path uniquely identifies a block within a model hierarchy, even when the model hierarchy references the same model multiple times.

Output Arguments

collapse all

Block path elements, returned as a cell array of character vectors.

Version History

Introduced in R2010b

See Also

Objects

Functions