Referring to a fitting made previously thanks to the help of a member:
Fit noisy data as a Least squares problem?
I would like to ask for help to fit 2 noisy data sets to 2 models, referring to the same equation with different conditions.
I have an equation T1:
Dif = 0.00000013; K0 = 0.5; z = 0; linf\[Alpha] = 0.0;
T1[x_, y_, t_, b_, l_, d_, m_, Intens_] /;
NumberQ[x] && NumberQ[y] && NumberQ[b] && NumberQ[l] && NumberQ[d] && NumberQ[m] &&
NumberQ[Intens] :=
Intens/(2*\[Pi]*K0)*
NIntegrate[
Sqrt[1 + m^2]*
Erfc[Sqrt[(x - \[Alpha])^2 + (y - \[Beta])^2 + (z - (m*\[Alpha] -
d))^2]/Sqrt[
Dif*4*t]]/(Sqrt[(x - \[Alpha])^2 + (y - \[Beta])^2 + (z - (m*\
\[Alpha] - d))^2]), {\[Beta], -b/2, b/2}, {\[Alpha], linf\[Alpha],
l*(1/(1 + m^2))}]
I create noisy data for y=0 and x=0:
Block[{y = 0, t = 1, b = 0.001, l = 0.001, d = 0.0001,
m = -Tan[45*Pi/180], Intens = 25000},
datax = Table[{x,
T1[x, y, t, b, l, d, m, Intens] +
Random[NormalDistribution[0, 0.1]]}, {x, -0.002, 0.002,
0.000015}]];
Block[{x = 0, t = 1, b = 0.001, l = 0.001, d = 0.0001,
m = -Tan[45*Pi/180], Intens = 25000},
datay = Table[{y,
T1[x, y, t, b, l, d, m, Intens] +
Random[NormalDistribution[0, 0.1]]}, {y, -0.002, 0.002,
0.000015}]];
and after, all I want to do, is to fit the two noisy data sets to the equation above for y=0 and x=0, in order to find the best fitting parameters {b,l,d,m,Intens}.
I thought about using Join as follow (t=1):
alldata = Join[datax, datay];
fit=FindFit[alldata,T1[x,y,1,b,l,d,m,Intens],{b,l,d,m,Intens},{x,y},Method->"LevenbergMarquardt"]
but nothing. Could anyone help me? Thanks.