3

All GUI components Callback functions have function might not be used warning.

I know it sound silly for most of programmers to care about such silly warnings when code is running okay, but I wonder why emit such a warning although the function is called when the button is clicked, or whatever component Callback event happens.

Can anyone here explain how to fix this warning? or why this even happens?

Hint: I am using Matlab R2011a , if it differ for one version to another.

Sameh K. Mohamed
  • 2,323
  • 4
  • 29
  • 55

1 Answers1

3

The solution is to add this string %#ok<DEFNU> at the end of function definition line to to disable might not be used warning in this line or %#ok<*DEFNU> to disable this warning type in current file.

And it indicates that no warning and this issue is okay in the run time.

Sameh K. Mohamed
  • 2,323
  • 4
  • 29
  • 55