checkbounds 函数中的曲线拟合误差 MATLAB

问题描述 投票:0回答:1

我尝试运行这里有一个示例代码

x = linspace(1,100);  
y = 5 + 7*log(x);
myfittype = fittype('a + b*log(x)',...
    'dependent',{'y'},'independent',{'x'},...
    'coefficients',{'a','b'})
myfit = fit(x',y',myfittype)

我收到以下错误消息

检查边界错误(第 26 行)

如果 lenlb > nvars

fit>iFit 出错(第 275 行) [lowerbnd, upperbnd, anError, aWarning] = checkbounds( lowerbnd, upperbnd, numcoeff );

拟合错误(第 116 行)

[fitobj, 善良, 输出, convmsg] = iFit( xdatain, ydatain, fittypeobj, ...

然而,我的代码昨晚运行得非常好。我想不出我今天所做的任何事情可能会导致这个问题。 我确实更改了路径,但现在将其设置为默认值,但仍然遇到此问题。还有其他可能的原因吗?

matlab curve-fitting toolbox
1个回答
0
投票

显然,还有另一个 checkbounds.m 函数,但 MATLAB 以某种方式使用了第一个函数

我运行了代码

which checkbounds -all

并且得到了

C:\Program Files\MATLAB\R2023a oolbo

© www.soinside.com 2019 - 2024. All rights reserved.