Pass variable from GUI to function in MATLAB
===

I have a MATLAB GUI that loads to aid in visually pre-processing data.  Essentially it prompts the user to adjust the data range, reduce number of data points, etc... all while providing an updated graph.  Upon completion of this work, I want to be able to close out the GUI and pass variables from the GUI to another MATLAB function that does the data analysis.  I have found lots of information on how to pass information from a function TO and GUI, but not the other way around.  

Any help would be greatly appreciated.