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
 All Forums
 Origin Forum
 Origin Forum
 Merging and separating two columns

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
freefeynman123 Posted - 07/28/2016 : 11:24:11 AM
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.
1   L A T E S T    R E P L I E S    (Newest First)
Hideo Fujii Posted - 07/28/2016 : 5:35:05 PM
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

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000