MATLAB Guide GUI Help - Strange Error in axes() callback - Not enough input arguments

3 vues (au cours des 30 derniers jours)
Connor Beck
Connor Beck le 23 Juin 2017
Commenté : Connor Beck le 23 Juin 2017
So I have a long GUI code I am developing and I ran into a really strong error when I was trying to display an image in a specific axes. I have 8 different axes displaying images and when I was calling them back in the function I ran into the error
"Not enough input arguments".
the error occurs in this line, and I have checked the tag on the axes and it definitely matches.
axes(handles.Overall_Image_axes);
I would post the whole code but it is too long, I just need to know if this is actually an error with the axes or if I messed up somewhere else along the way.
Thanks, Connor

Réponses (1)

Jan
Jan le 23 Juin 2017
What is the contents of handles.Overall_Image_axes? Check this with the debugger. Type this in the command window:
dbstop if error
Now run the code again until it stops. Then you can check the value, e.g. in teh command window. Is it empty? Is it a function handle of a function, which expects an input?
The problem might become clear, if you post the complete error message. The details matter.
Check also during the debugging, if e.g. "axes" has been redefined:
which axes -all
  1 commentaire
Connor Beck
Connor Beck le 23 Juin 2017
Thanks for the debugging tip, I was able to recreate the axes in the gui and the problem seemed to disappear.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Creating, Deleting, and Querying Graphics Objects 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