# MATLAB: Run m files by using GUI

MATLABmatlab gui

I need to run m file from the push button by using GUI and enter some variables before the run.How can I apply these by GUI? There is a loop in the m file. Is that a problem for the GUI application? I will be appreciated with your answers. If there is a simple example, I will be so satisfied.
With best regards.

doc scripts %execute this to learn about scripts
doc functions %execute this to learn about functions