Hi,
You can define the fitting function with an embedded For loop in the function definition box.
For example,
1.Define your fitting functions in the Function edit box:
y=func3(x, B_0, n)
2.Define the functions in the LabTalk Functions Definition and Initializations box
function B_i(double t)
{
//define your function here
}
function τ_i(double t)
{
//define your function here
}
function func3(double t , double B_0, int n) //Summation
{
double aa=B_0;
for(ii=1; ii<=n; ii++)
{
aa = B_i*exp((-t)/ τ_i) + aa;
}
Return aa
}
Hope it helps.
Yuki
OriginLab