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 for Programming
 LabTalk Forum
 subtract 2 sheets in the same book

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
elena_loginova Posted - 10/06/2009 : 9:56:25 PM
Origin Ver.: 8 SR 1
Operating System: Windows XP

Hi,

I would appreciate your help in writing a script to subtract two sheets (baseline from rawdata) in the same book. The following script that I wrote doesn't work:

loop (i, 1, rawdata.ncols) {
range a = [Book1]rawdata!Col(i);
range b = [Book1]baseline!Col(i);
range c = [Book1]data!Col(i);
c = a - b; }

Thank you in advance for your help!
3   L A T E S T    R E P L I E S    (Newest First)
elena_loginova Posted - 10/12/2009 : 8:35:55 PM
Thank you!
cpyang Posted - 10/07/2009 : 9:26:10 PM
instead of col($(i)), better use wcol(i).

CP
elena_loginova Posted - 10/07/2009 : 6:33:55 PM
It might be useful to somebody else. I understood, why it doesn't work: I had to use $i instead of i.

loop (i,1,1000) {
range a = [Book1]rawdata!Col($(i));
range b = [Book1]baseline!Col($(i));
range c = [Book1]data!Col($(i));
c = a - b;
};

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