MATLAB ヘルプ センター
Find bindings between objects
Since R2024a
b = findbindings(obj)
b = findbindings(obj,"source")
b = findbindings(obj,"destination")
b = findbindings(obj) finds all bindings where obj is either the source or destination of the binding. The function returns the bindings as an array of Binding objects.
obj
Binding
example
b = findbindings(obj,"source") finds all bindings where obj is the source of the binding.
b = findbindings(obj,"destination") finds all bindings where obj is the destination of the binding.
collapse all
Create a spinner in a UI figure.
fig = uifigure; spn = uispinner(fig);
Create a Simulation object that represents a simulation of the bouncingBall model and load the model.
Simulation
bouncingBall
s = simulation('bouncingBall',LoadModel=true);
Connect the spinner to a model variable by creating a binding.
vars = s.TunableVariables; varname = "K:bouncingBall"; bind(spn,"Value",vars,varname);
Find all bindings for which the spinner is either a source or a destination.
b1 = findbindings(spn)
b1 = Binding with properties: Source: [1×1 Spinner] SourceParameter: 'Value' Destination: [1×1 simulink.sim.Variables] DestinationParameter: 'K:bouncingBall' Enabled: 1
Find all bindings for which the spinner is a destination. In this case, there are none, so findbindings returns an empty array of Binding objects.
findbindings
b2 = findbindings(spn,"destination")
b2 = 1×0 Binding array with properties: Source SourceParameter Destination DestinationParameter Enabled
Signals
Variables
Source or destination of a binding, specified as one of these objects:
UI component
Signals object associated with the LoggedSignals property of a Simulation object
LoggedSignals
Variables object associated with the TunableVariables property of a Simulation object
TunableVariables
Introduced in R2024a
bind
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
ヨーロッパ
アジア太平洋地域
最寄りの営業オフィスへのお問い合わせ