Yes, there are many ways to do this. One way is to use EVALIN. Let's say you have a variable named g in the base workspace. Then in the callback to a pushbutton, put this:
Another method is to store the variables you want in the GUIDATA structure of the GUI. See the help for GUIDATA to understand its use. Note that GUIDE GUIs are invisible to GCF, so you will have to use FINDALL to access the GUI handle from the base workspace. Perhaps easier would be to store the data in the userdata property of the root object.
Then from in the GUI:
mydata = get(0,'userdata')