필터 지우기
필터 지우기

Callback execution using regular expression

조회 수: 1 (최근 30일)
Jose Caballero
Jose Caballero 2016년 4월 15일
답변: Walter Roberson 2016년 4월 15일
Hi,
I have a GUI that has 25 checkboxes to plot different signals in an axes. There are several operations that can be performed by the user on the signals by triggering callbacks (scaling,rotation,...).
I just want to re-trigger the 25 callbacks without having to copy the 25 callback calls. Is there any way of doing this using regular expressions (with regexp or similar)?
Jose

답변 (1개)

Walter Roberson
Walter Roberson 2016년 4월 15일
No.
Create a cell array of handles to the functions, and then you can loop through that.
You should also be considering using the same function for all of them, possibly with different parameters or by looking at the Tag of hObject to figure out which button was invoked.

카테고리

Help CenterFile Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by