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.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
유럽
아시아 태평양
지역별 지사에 문의