validate
ブロック パスが有効なブロック階層を示しているかを特定します。
説明
例
ブロック パスの検証
ModelReferenceHierarchy
という名前のプロジェクトを開きます。
openProject("ModelReferenceHierarchy");
プロジェクトで sldemo_mdlref_depgraph
を最上位モデルとしたモデルの階層構造が開きます。
ブロックを正しく表す Simulink.BlockPath
オブジェクトを作成します。
bp = Simulink.BlockPath(... {'sldemo_mdlref_depgraph/thermostat',... 'sldemo_mdlref_heater/Fahrenheit to Celsius'});
ブロック パスが有効であるかどうかをチェックします。
validate(bp);
ブロック パスが有効であるため、関数はエラーを返しません。
ブロックを正しく表していない Simulink.BlockPath
オブジェクトを作成したとします。たとえば、パス内のモデル名やブロック名にタイプミスがある場合などです。この場合、ブロック パスが無効であるため、関数はエラーを返します。
入力引数
bp
— 完全に指定されたブロック パス
Simulink.BlockPath
オブジェクト
完全に指定されたブロック パス。Simulink.BlockPath
オブジェクトとして指定します。このブロック パスは、モデルの階層構造が同じモデルを複数回参照する場合でも、モデルの階層構造内のブロックを一意に特定します。
バージョン履歴
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)