0
以下、赤い十字はデータ、青い線はフィットの曲線です。nsqnonlin - 誤った収束 - フィットした曲線はデータを全くモデル化しません
これは、関数でフィット感です:私の開始値である
function diff = fit_simp(x,X,Y)
% This function is called by lsqnonlin.
% x is a vector which contains the coefficients of the
% equation. X and Y are the option data sets that were
% passed to lsqnonlin.
A1 = x(1);
A2 = x(2);
mode1 = x(3);
mode2 = x(4);
sig1 = x(5);
sig2 = x(6);
alpha = x(7);
beta = x(8);
gamma = x(9);
diff = (A1/(sqrt(2*pi)*sig1))*exp(-0.5.*((X-mode1)/sig1).^2) + (A2/(sqrt(2*pi)*sig2))*exp(-0.5.*((X-mode2)/sig2).^2) + alpha + beta*X + gamma*X.*X
:MATLABから
X0=[0.1 0.02 0.6 1.2 1 1 0.1 -0.2 0.011]
最終メッセージ:
Optimization completed: The first-order optimality measure, 3.114006e-10,
is less than options.OptimalityTolerance = 1.000000e-06.
Optimization Metric Options
relative first-order optimality = 3.11e-10 OptimalityTolerance = 1e-06 (default)
私は行方不明のものがありますか?より単純な機能のために働きます。