Hi Scalpa,
Try this for example:
fname$=system.path.program$ + "Samples\Curve Fitting\Exponential Growth.dat"; // prepare data
newbook;
impasc;
wks.ncols=4;
wks.col3.type=4;
string strData$ = %(%H,$(wks.ncols)); // Remember the name of the added column
range fitx=1[x.6:1.4], fitx2=3, fity=4;
plotxy (1,2);
nlbegin 1 ExpGrow1 tt; // initialize fitting session for the first plot using ExpGrow1 function
tt.x0=0;tt.f_x0=1; // first fix the x0 value at that initial date
tt.y0=0;tt.f_y0=1; // also fix y0
tt.A1=1;
nlfit 3; // do only 3 iterations
tt.f_x0=0;tt.f_y0=0; // then relax the x0 and y0 to fit with default max iterations
nlfit;
fity=fit(fitx); // now we can generate the fit curve;
fitx2=fitx;
nlend; // all don
layer -i %(strData$); // Include the fit in the plot
set %(strData$) -c 2; // Set its color to red
range fitx=1[x.6:1.4]
means column 1 x-values from 0.6 to 1.4.
range fitx=1[30:80]
means column 1 row index from 30 to 80.
See: https://docs.originlab.com/labtalk/guide/range-notation/#Specifying_Subrange_Using_X_Values
Best,
Chao