Optimization least square approach
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi everybody
I'm trying to find the optimum value of a vector of parameters to approximate an experimental set of data starting from a simplified vector x_0
x_0= [0.13084 ; 0 ; 0; 0; 0; 0 ]
par=fminsearch(@(par)errHjk(par,frq_redHjk,csi_i,w0i,Hjk_red_exp),x_0,options);
where has been defined the fun :
function err = errHjk(par, frq_redHjk,csi_i,w0i, Hjk_red_exp)
Aj=par(1,1);
Bj=par(2,1);
Cj=par(3,1);
Dj=par(4,1);
Ej=par(5,1);
Fj=par(6,1);
omega_red= frq_redHjk*2*pi;
Hjki=(Aj+1i*Bj)./(-omega_red.^2+2i*w0i*csi_i+w0i^2) + Cj+1i*Dj +(Ej+1i*Fj)./omega_red.^2 ;
%Output the error
error= (Hjki-Hjk_red_exp);
err = sum (real(error.^2)) + sum(imag(error.^2)) ;
end
instead of find the minimum value the error found by the program continues to increase
Do you know what is wrong with this code ?
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Interpolation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!