我正在使用有理函数(多项式比)来近似Theodorsen函数。我在使用Matlab中的lsqcurvefit函数猜测正确的(最佳)初始猜测参数时遇到问题。有没有办法知道什么是最佳的初始猜测参数以获得最佳的拟合结果?
我的代码如下:
k = logspace(-10,1,300);
% Exact Theodorsen's Function C(k) in terms of Bessel Function
Ck= @(k)(besselh(1,2,k))./(besselh(1,2,k)+1i*besselh(0,2,k));
% Ckget function used to extract real and imaginary numbers and stacks the result
Ckget= @(k)[real(Ck(k)); imag(Ck(k))];
% Define 3rd order approximation function
x0= [.1,.1,.1,1,.1,.1,.1,.1]; % Create initial guess
U = 200;
b = 3;
s = 1i*k*(U/b);
Ck2 = @(x,k)((x(1)*s.^3 + x(2)*s.^2 + x(3)*s + x(4))./(x(5)*s.^3 + x(6)*s.^2 + x(7)*s + x(8)));
Ck2get= @(x,k)[real(Ck2(x,k)); imag(Ck2(x,k))]; %extract real & imaginary values
% Use curve fit function for best fit approximation
x2= lsqcurvefit(Ck2get,x0,k,Ckget(k))