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
 check if column exists for averaging

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
juannim Posted - 10/30/2007 : 6:21:06 PM
Origin Version (Select Help-->About Origin): 7.5
Operating System:xp
I have 51 columns of data, from three replicates of 17 measurements. Columns are named as such:
290a 290b 290c 300a 300b 300c 310a 310b 310c

In some cases, however, one of the letters might be missing- e.g.
290a 290b 290c 300b 300c

I need to average all of the 290 columns, all of the 300's, etc.
How can I check to see if a column exists to modify the averaging loop to move on if there is a missing column? Jonathan
3   L A T E S T    R E P L I E S    (Newest First)
Mike Buess Posted - 10/31/2007 : 12:47:18 PM
quote:
What is the meaning of the >0 in the script?
>0 means greater than zero.

As written, the value of exist() function returns zero if dataset Data1_290c does not exist. If dataset exists the function returns a positive value that depends on if and how it's plotted.

Mike Buess
Origin WebRing Member
juannim Posted - 10/31/2007 : 09:27:09 AM
Mike,
Thanks for your help, as usual. What is the meaning of the >0 in the script? Thanks. Jonathan
Mike Buess Posted - 10/30/2007 : 8:44:43 PM
Use LabTalk's exist() function...

if( exist(Data1_290c,1)>0 ) {column 290c exists in worksheet Data1 so do something};
else {it does not exist so skip};

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 10/30/2007 9:20:31 PM

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