Filter löschen
Filter löschen

Callback execution using regular expression

4 Ansichten (letzte 30 Tage)
Jose Caballero
Jose Caballero am 15 Apr. 2016
Beantwortet: Walter Roberson am 15 Apr. 2016
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

Antworten (1)

Walter Roberson
Walter Roberson am 15 Apr. 2016
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.

Kategorien

Mehr zu Interactive Control and Callbacks finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by