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?
回答(1 个)
Wayne King
2013-1-22
编辑:Wayne King
2013-1-22
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 个评论
David
2013-1-23
Walter Roberson
2013-1-23
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
Tom Lane
2013-1-24
Sometimes it's beneficial also to type
rehash toolbox
类别
在 帮助中心 和 File Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!