Error: Undefined function or method 'gamfit' for input arguments of type 'double'

Function gamfit.m is a simple Statistics toolbox function that only requires a data vector as input and attempts to fit a gamma distribution to the data. I assume that 'double' refers to double precision? All variables are 'double' by default. Why am I getting this error, and how can I get around it?

Answers (1)

This most likely means either you do not have the Statistics Toolbox installed, or you are using a version of the Statistics Toolbox prior to the introduction of gamfit.m
Enter
>>ver
to see what toolboxes you have installed.
If you see Statistics Toolbox in that list and you are using a networked configuration, enter
>>license('test','statistics_toolbox')
to see if a 1 is returned.
The error message actually means that MATLAB cannot find gamfit.m and the data type of the input argument is not relevant here.

3 Comments

Thanks, Wayne. I checked and my Matlab is version 7.12 and the Stat toolbox is version 6.8. I can open the function in the editor and display the help in the command window, so the function is there, although one or more of the functions it call might not be, but I don't see why unless it got removed somehow.
Because I'm so close to retirement, I allowed the maintenance on my individual Mac license to lapse last year. Would that explain it? I think not, because in addition I tried installing a group license that many colleagues use and it gives exactly the same error.
Still fishing for ideas ...
Did you try the license 'test' that Wayne showed?
If you have the software installed but not licensed then you would be able to see the help information but not run it.
Try at the command line
which -all gamfit
Sometimes it's beneficial also to type
rehash toolbox

Sign in to comment.

Categories

Tags

Asked:

on 22 Jan 2013

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!