Info

此问题已关闭。 请重新打开它进行编辑或回答。

In the code if i am changing the power of xdata from 0.1 to 0.9 i am getting same coefficient values 0.2000 10.00 10.00 of x1,x2 and x3. please suggest me what changes are required???

1 次查看(过去 30 天)
xdata =[10.^(-3) 10.^(-2) 10.^(-1) 1 10.^(1) 10.^(2)]; ydata=(0.5012./(xdata.^2+1.8*xdata+2.2 )); fun=@(x)sum(x(1)./((x(2).*xdata.^1.1+x(3).*xdata.^0.1+1)- ydata).^2); options = optimoptions('particleswarm','SwarmSize',100,'HybridFcn',@fmincon); rng default % For reproducibility nvars = 3; LB = [0.2;0.2; 0.2]; UB = [10; 10; 10]; [x] = particleswarm(fun,nvars,LB,UB,options)

回答(0 个)

此问题已关闭。

标签

Community Treasure Hunt

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

Start Hunting!

Translated by