I had to dig into the code to get this sucker to work (sans GUI). Below is a matlab file for a function of a single variable in FuncEval with nonlinears in constraintEval. Also, note that you will get an error when it's done. You can either ignore it, or comment out the very last line of BNB20.m . If your function requires separate inputs other than x, put those in the call to BNB20 after options.

%% BNB Call
% Initialize x0, Column Vector
x0 = [1];
% BNB variable types
% Continuous for xstatus(i)=0
% Integer for xstatus(i)= 1
% Fixed for xstatus(i)=2
xstat = [1];
% this problem has no inequality constraints
A = [];
b = [];
% this problem has no equality constraints
Aeq = [];
beq = [];
% Given Bounds in problem statement
lb = [ ...
0
];
ub = [ ...
31
];
% Set settings
setts = []; % Leave as default
% Set options
options = optimset('Display','iter','TolX',1e-4,'maxSQPiter',Inf)
%% Run the BNB Code!
[errmsg,Z,X,t,c,fail] = BNB20('FuncEval',x0, ...
xstat,lb,ub,A,b,Aeq,beq,'constraintEval',setts,options)