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
 Extracting averages across rows for huge data sets

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
savagemj Posted - 10/14/2005 : 12:03:50 PM
Origin Version (Select Help-->About Origin):
Operating System: Win XP

We work with data sets that have nearly two million rows and many columns, each column with its own header and label.

We first work on each column to calculate, for example the cube of (Ti - Ti-2) where Ti is the temperature in row i and Ti-2 that in row i - 2.

Now we want to get the average of these for the first 18000 data rows and then the average for rows 18001 to 36000, etc. down to the bottom of the worksheet. Is there an easy way to do this in the Origin worksheet?

Thanks in advance.

MJS
1   L A T E S T    R E P L I E S    (Newest First)
Mike Buess Posted - 10/14/2005 : 4:07:30 PM
Hi MJS,

I take it you already know how to get the cubes and only need help with the averaging. In that case you can use the following LabTalk script to extract the averages to a new worksheet.

groupsize=18000;
get col(1) -e nrows; // # rows
%W=%H; // save wks name
win -d; // duplicate
doc -e W {%L=%H}; // find name of duplicate
win -a %L; // activate duplicate
set %H -er int(nrows/groupsize); // reduce # rows
for(ii=1;ii<=wks.ncols;ii++)
{
// average each column
%(%H,ii)=ave(%(%W,ii),groupsize);
};

Mike Buess
Origin WebRing Member

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