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
 problem with data extraction

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
lastlastlast Posted - 06/10/2008 : 05:13:01 AM
Origin Version (Select Help-->About Origin): 7.0
Operating System: Win XP

I want to extract some data with a certain series of row indexs. I have put the required index number in a column, column B. I tried to extract the data with Analysis->Extract worsheet data, and write some equations, but fail.

Related euqations such as "if col(C)[i]==col(B)", "col(C)==col(B)" dont work,
where column C is set to be the same as the index in the data, column B is the
required index to be extracted.

Can anyone give me some hints on how to solve this problem?

Thanks.
1   L A T E S T    R E P L I E S    (Newest First)
greg Posted - 06/10/2008 : 3:00:34 PM
There is no notation that will make an IF statement find the values you want. You would need a script of some kind to mark the necessary rows. Here is one example:

get col(1) -e end1;
get col(2) -e end2;
wo -a 2;
set wcol(wks.ncols-1) -e end1;
set wcol(wks.ncols) -e end1;
wcol(wks.ncols-1) = 0;
wcol(wks.ncols) = 0;
loop(ii,1,end) {
val=col(2)[ii];
wcol(wks.ncols-1)=col(1)==val?1:0;
wcol(wks.ncols)+=wcol(wks.ncols-1);
}

which looks for all instances of column 2 values in column 1 and marks a new column with 1. You could then use the new column in a worksheet extraction.


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