I figured it out. Apparently, the input variables that went into the function still weren't considered as such. Thus, the function was unable to run. The assignin() function isn't necessary before running the function.
I'll just post the relevant part of the code:
else
[filename pathname] = uigetfile('*.txt','Explosive parameters'); %if choice 2
if ~ischar(filename) && ~ischar(pathname) % If no file
msgbox('No file selected.','Error');
set(handles.BuildingText,'String','Error: Must select a file.');
return
end
ExplosivePar = importdata([pathname filename]);
dt = ExplosivePar(1);
eEXP = ExplosivePar(2);
wEXP = ExplosivePar(3);
R = ExplosivePar(4);
[Z,P] = blastLoadFun(eEXP,wEXP,R);
assignin('base','Z',Z);
assignin('base','P',P);
end