MATLAB: Glmfit stats error

argumentsglmfit

I have been using glmfit to perform a logistic regression. It was working for several days, but now something has changed and when I request stats back from the fit it returns an error. What am I doing wrong in the following example:
x = [2100 2300 2500 2700 2900 3100 3300 3500 3700 3900 4100 4300]';
y = [1 0 0 1 1 0 0 0 0 1 0 1]';
This line works:
[b,dev] = glmfit(x,y,'binomial','link','logit');
This line fails:
[B,dev,stats]=glmfit(x,y,'binomial','link','logit');
??? Error using ==> beta
Too many input arguments.
Error in ==> glmfit at 377
anscresid = beta(t,t) * ...
I am sure it is a simple issue but I really don't know what I changed or what is going wrong to cause this issue. Any guidance would be very helpful. Thanks

Best Answer

It works fine on my machine. I would try:
which beta
It should return something like: .../toolbox/matlab/specfun/beta.m
It is possible you have added a function beta to your path which overloads the builtin function.