MATLAB: GUI

functionguiscriptscript file

why GUI certainly use FUNCTION to run, cannot use SCRIPT to run?

Best Answer

You can create a GUI in a script also. But GUIDE uses nested function and/or subfunctions for the callbacks. And functions cannot be defined inside scripts.