Effacer les filtres
Effacer les filtres

Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

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 vue (au cours des 30 derniers jours)
ash
ash le 16 Juil 2018
Clôturé : MATLAB Answer Bot le 20 Août 2021
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)

Réponses (0)

Cette question est clôturée.

Community Treasure Hunt

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

Start Hunting!

Translated by