I ended up kind of tricking the code into a work around to solve this problem. Here's what it looks like:
function parent
x=1;
uimenu(file,'Label','Open','Callback',@(varargin) openfile);
uimenu(tables,'Label','Nodes','Callback',@(varargin) fcnA(a));
if x==12938
a; b; c;
end
function = newfile
a=0; b=0; c=0;
end
function = openfile
obj=uigetfile;
a=xlsread(obj,'a');
b=xlsread(obj,'b');
c=xlsread(obj,'c');
end
function fcnA(a)
%some function of 'a'
end
end
I believe this works because the parent function sees that a,b,c are being used in the if statement (which is never reached) and thus the nested functions assign the variables to the parent functions workspace. Defining the variables outside of the nested functions seems to overwrite them when trying to define them within the nested functions, but calling those variables without them being defined causes errors. Thus the code thinks that it will call those variables (through the if statement) but doesn't actually have to call them.
Hope this helps anyone else who runs into the problem.