convertToCell
ブロック パスを文字ベクトルの cell 配列に変換
説明
例
ブロック パスを表す cell 配列の作成
ModelReferenceHierarchy
という名前のプロジェクトを開きます。
openProject("ModelReferenceHierarchy");
プロジェクトで sldemo_mdlref_depgraph
を最上位モデルとしたモデルの階層構造が開きます。
Simulink.BlockPath
オブジェクトを作成します。
bp = Simulink.BlockPath(... {'sldemo_mdlref_depgraph/thermostat',... 'sldemo_mdlref_heater/Fahrenheit to Celsius',... 'sldemo_mdlref_F2C/Gain1'});
ブロック パスの要素を表す cell 配列を作成します。
cellarray = convertToCell(bp)
cellarray = 3x1 cell
{'sldemo_mdlref_depgraph/thermostat' }
{'sldemo_mdlref_heater/Fahrenheit to Celsius'}
{'sldemo_mdlref_F2C/Gain1' }
入力引数
bp
— 完全に指定されたブロック パス
Simulink.BlockPath
オブジェクト | Simulink.SimulationData.BlockPath
オブジェクト
完全に指定されたブロック パス。Simulink.BlockPath
オブジェクトまたは Simulink.SimulationData.BlockPath
オブジェクトとして指定します。このブロック パスは、モデルの階層構造が同じモデルを複数回参照する場合でも、モデルの階層構造内のブロックを一意に特定します。
出力引数
cellarray
— ブロック パス要素
文字ベクトルの cell 配列
ブロック パス要素。文字ベクトルの cell 配列として返されます。
バージョン履歴
R2010b で導入
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)