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
 Script for altering multiple columns by same value

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
bquezada Posted - 10/10/2006 : 6:17:26 PM
Origin Version (Select Help-->About Origin):Pro7.5
Operating System: WinXP

On multiple occasions, I have several scans (~8-10) of energy (x) vs. intensity (y) on a given worksheet, one of these scans is the normalization region. After figuring out the factors, I need to shift all of the energy columns (x) by the same amount, and multiply the intensities (y) by some normalization factor. I have thus far done this by going into each column and using "Set Column Values" but is there a way that I can just enter the energy shift and normalization factors and it will modify the columns accordingly quickly.
1   L A T E S T    R E P L I E S    (Newest First)
Mike Buess Posted - 10/10/2006 : 11:05:37 PM
The following LabTalk script will work. Assign it to your Custom Routine button for convenience.

getn (Energy shift) xinc (Normalization factor) ynorm (Enter values);
for(i=1; i<wks.ncols; i+=2)
{
wcol(i) -= xinc; // translate X column
wcol(i+1) *= ynorm; // normalize Y column
}

Mike Buess
Origin WebRing Member

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