Hi
You can build a function by using Code Builder in Origin. Set 3 vector to present the 3 columns. Then you should use a loop to calculate with the initial values. You can refer to the following code.
ForumProblem(int PointNum, double a, double b)
{
vector x(PointNum),f(PointNum), g(PointNum);
//initial values
x[0]=1;
f[0]=5;
g[0]=3;
for (int i=1;i<PointNum;i++)
{
x[i]=x[i-1]+1;
f[i]=1/ln(g[i-1]);
g[i]=(f[i]/a)^(-0.5)*b;
}
//Create worksheet.
Worksheet wks;
wks.Create();
Page pg = Project.Pages(-1);
////import to worksheet.
Dataset dsX, dsY1, dsY2;
dsX.Attach(wks, 0);
dsY1.Attach(wks, 1);
wks.AddCol();
dsY2.Attach(wks, 2);
dsX = x;
dsY1 = f;
dsY2 = g;
}
Cecilia
OriginLab Corp.