how to execute .m file from gui push button, I have a separate GUI .m file In this I want to execute another .mfile on click of push button
Best Answer
In the callback code for the push button, add a line which is just the name of the .m file. For example if the .m file is AnotherFunction.m then the line to add would be
Is your .m file a function or a script? You need to understand the difference.Functions and Scripts.
If it is a function, you can use output argument to pass in the data. If it is a script, you can run the .m file directly with the GUI function callback to set up the data, although this approach is not recommended.
Best Answer