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
 how to calculate the sum of every n 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
adilmeraki Posted - 12/17/2015 : 3:04:51 PM
Hi,

I have one X axis and 12000 Y axis, but I want to have summation of every 10 columns and create new books. Okay I can do it by worksheet-reduce columns-merge columns but it takes too much time especially that kind of huge data set. it should be some script to make it faster.

my another problem is that i am finding integration for my spectra some specific peaks and needs repeat this integration many columns. Now I use batch peak analyze but it also takes long time for huge data set.


thank you
1   L A T E S T    R E P L I E S    (Newest First)
Hideo Fujii Posted - 12/17/2015 : 5:55:11 PM
Hi Adilmeraki,

Please try the following script which produces a summarized new worksheet from the current worksheet. Essentially it's just a loop of the worksheet-reduce columns-merge columns:
nskip=10;
icol=1;
for(ii=1; ii<wks.ncols; ii=ii+nskip) {
  wreducecols method:=merge ncols:=nskip merge:=sum start:=icol ow:=ColSummary;
  icol=icol+nskip;
}
Hope this works.

--Hideo Fujii
OriginLab

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