ヘルプ センターヘルプ センター
現在のブロックのパス名を取得
bl = gcb
bl = gcb(sys)
例
bl = gcb は、現在のシステム内にある現在のブロックの絶対ブロック パス名を返します。現在のブロックは以下のものを意味します。
最後にクリックされたブロック
対応する MATLAB® 関数を現在実行している S-Function ブロック
コールバック ルーチンが実行中のブロック
MaskInitialization のパラメーター評価の一部としてマスクが評価されるブロック
MaskInitialization
モデルを開いた後で最後に読み込まれたブロック
bl = gcb(sys) は、指定したシステム内の現在のブロックの絶対ブロック パス名を返します。最初にシステムを読み込んでください。
sys
すべて折りたたむ
モデルを開きます。
vdp
モデル内のブロックを選択します。たとえば Gain ブロックを選択します。次に、コマンド プロンプトで gcb と入力します。
gcb
ans = vdp/Mu
Gain ブロックを選択します。
get_param で gcb の値を使用し、Gain パラメーターの値を取得します。
get_param
Gain
x = get_param(gcb,'Gain')
x = 1
フォールトトレラント燃料制御システムのモデル化のモデル例 sldemo_fuelsys を読み込みます。
sldemo_fuelsys
openExample('simulink_automotive/ModelingAFaultTolerantFuelControlSystemExample') load_system('sldemo_fuelsys');
fuel_rate_control サブシステム内の現在のブロックを取得します。
fuel_rate_control
bl = gcb('sldemo_fuelsys/fuel_rate_control')
bl = sldemo_fuelsys/fuel_rate_control/validate_sample_time
ブロックを含むシステム。文字ベクトルとして指定します。
例: 'vdp' 'sldemo_fuelsys/fuel_rate_control'
'vdp'
'sldemo_fuelsys/fuel_rate_control'
R2006a より前に導入
gcbh | gcbp | gcs | get_param
gcbh
gcbp
gcs
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
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:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office