Hi,
I assume that the X and Y values are in the column 1 and 2. You can try to use this script to get the value:
wks.addcol();// add a new column
double bb=max(col(2));
double cc=min(col(2));
int aa = wks.ncols;
wcol(aa)=abs(col(2)-((bb+cc)/2));
limit wcol(aa); // Find min value in the new column using limit command
double dd = col(1)[$(limit.imin)]; // limit.imin -- Corresponding index for minimum Y value.
dd=;
Please refer to this page about the limit command.
http://www.originlab.com/www/helponline/Origin/en/Programming/mergedProjects/LabTalk/LabTalk/Limit_%28command%29.html
Thanks,
Jacqueline
OriginLab