MATLAB: How to link m-files iwith a push button in GUI maltab

.m filesmatlab guipushbutton

I had a GUI interface, i wish to run my function which save in m-file with one of a push button in my GUI. Please show me the ways to handle this situation..thanks alot

Best Answer

In the callback of your push button, just give the name of the function you wish to run. For example,
function pushbutton1_callback( hObject, event )
your_function_name_here();
end