There would have been at least one more line of error message before that, telling us what MATLAB thinks is wrong.
Is there a function figure1_CloseRequestFcn inside main4.m ?
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!