Origin Ver. and Service Release: Origin Pro 2016 (64bit) SR 1 Operating System: Windows 7
Hello everyone,
I have measurements of a damped oscillation and try to extract the position of the maxima of each of the peaks with help of LabTalk. The data is simple XY and each measurement consists of 4000 rows and all the measurements are written below each other. So 1st [1:4000], 2nd [4003:8002], 3rd [8005:12004] etc. I have already written a script which works well for the individual measurements. My problem is that the subrange does not work. If I execute it for the 2nd measurement the results of the 1st part get deleted.
Script: range aa = col(4)[1:4000]; range bb = col(2)[1:4000]; range cc = col(5)[1:4000]; range dd = col(6)[1:4000]; pkFind iy:=bb method:=max ocenter:=aa ocenter_x:=cc ocenter_y:=dd dir:=p npts:=10 filter:=num value:=10;
range aa = col(4)[4003:8002]; range bb = col(2)[4003:8002]; range cc = col(5)[4003:8002]; range dd = col(6)[4003:8002]; pkFind iy:=bb method:=max ocenter:=aa ocenter_x:=cc ocenter_y:=dd dir:=p npts:=10 filter:=num value:=10;
I am new to writing scripts so please do not laugh about it
I hope I could make my problem clear and am thankful for every help
Please take a look at this page: https://www.originlab.com/doc/X-Function/ref/pkFind You can find that the output type is a vector while the input type is an XY range, so we can only output the value to a whole column not just a part of the column.
I think you can output the value of these measurements to different sheets and then copy them to the range where you desired.