I have data which consists of two columns - one is wavelength, the other one intensity. However, the wavelength column is repeated - measurement was taken twice in order to reduce number of spikes. Moreover, I've taken measurement from different window as well. I would like to merge these two windows to obtain broader spectrum. My problem is with separating repeated wavelength column and putting it to single column again. The picture below contains information how does the data look:
I would like to put separated data from window 2 to window 1 (merge first column from window 1 with first column from window 2 and repeated column from window 1 with repeated column from window 2) and have them in one book.
What I understood is that only each of before or after the middle position of X data, X are monotonically increasing. Correct? If so, we should make groups before and after that middle point. Please see the sample below.
Here X in Book1 (and Book3) are repeated. the column C is the detection of the middle point by the Set Column Values with "col(1)[i-1]>col(1)[i]?1:0". After this operation, column D was created to show the groups("0" and "1") by the formula "i==1?0:col(3)[i]+col(4)[i-1]". Then Book5 is created by the wAppend command (http://www.originlab.com/doc/X-Function/ref/wAppend) to merge Book2 and Book4; and Book6 is created by stacking ("Worksheet: Stack Columns" menu).
I hope the this sample could depict the procedure what I constructed.