Matlab Guide-created GUI local function calls

11 vues (au cours des 30 derniers jours)
Liam
Liam le 2 Avr 2014
I have a rather complex GUI that was created with GUIDE and sort of grew to monstrous proportions. I am now calling my local functions within the GUI from other scripts and from the command line. I have noticed that when calling a local function, the gui_mainfcn.m chokes if the first passed argument is a character array.
For example:
I would like to call the function myFunction which is housed in myGUI.m
I can call the function successfully by using
outputs = myGUI('myFunction', argument1, argument2, argument3...);
as long as argument1 is not a character array.
The error traces to line 78 in gui_mainfcn.m where ishghandle is called on the second argument which ends up blowing up specifically if it is a character array.
Is there a way around this issue, or should I just avoid character arrays as the first argument in any of my local gui functions? Maybe it could be fixed in future versions of MATLAB?

Réponses (0)

Catégories

En savoir plus sur Language Fundamentals dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by