MATLAB Error fitting Stable distribution to data - Help?
3 次查看(过去 30 天)
显示 更早的评论
MATLAB returns an unknown error every time I try to fit the Stable distribution to a dataset. I haven't encountered this error with previous datasets or MATLAB versions, but it has been 6 months since I've tried. This time I've used multiple data sets and confirmed that a Normal distribution will fit the datasets...but when I specify 'Stable' vice 'Normal', I get the following error:
"Unrecognized function or variable 'getIpOptions'.
Error in fmincon (line 832)
options =
getIpOptions(options,sizes.nVar,mEq,flags.constr,defaultopt,10,0.01);"
This code runs:
load hospital; % get MATLAB dataset
z = hospital.Weight; % Assign data values
pd = fitdist(z,'Normal');
However, this doesn't and returns the above error:
pd2 = fitdist(z,'Stable');
Is this a bug in the 2020a release?
I'm running:
>> version
ans = '9.8.0.1323502 (R2020a)'
0 个评论
回答(1 个)
colordepth
2025-3-10
Optimization Toolbox is required for using the 'Stable' distribution with 'fitdist'. If the toolbox is already installed, I suggest re-installing it and trying again. Refer to the following related discussions for more information and workarounds if Optimization Toolbox is not available:
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!