The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 Merging and separating two columns
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

freefeynman123

Poland
6 Posts

Posted - 07/28/2016 :  11:24:11 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hello everyone,

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.

I would appreciate any help.

Hideo Fujii

USA
1582 Posts

Posted - 07/28/2016 :  5:35:05 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi freefeynman123,

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.

--Hideo Fujii
OriginLab

Edited by - Hideo Fujii on 07/29/2016 11:19:25 AM
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000