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
 The script of integrals of the Cols Y with Col X

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
Tackle Posted - 10/20/2010 : 12:29:25 PM
Origin Ver. 7.5and Service Release (Select Help-->About Origin):
Operating System:Win 7
Hello£º
This is my first post, and thank everyone in advance.
Now I have 2 columns,one column X£¨A£© and one Y£¨B£©, Col A is time, Col B is concentration, and firstly, I want to subtract their first rows respectively( Col(A)=Col(A)-Col(A)[1];Col(B)=Col(B)-Col(B)[1]£©£»Secondly, I want to add 2 Y columns(C,D), and set Col(C)=Col(A)*Col(B), Col(D)=Col(A)*Col(C); Lastly, I want to get 3 integrals: the integral of Col(B) with Col(A); the integral of Col(C) with Col(A); the integral of Col(D) with Col(A) .The 3 integrals are just what I want to obtain .Then ,how can I realize these commands in "window script"? May anyone offer exact scripts?If these are too complicated to realize,how can I get integrals when I have already set the 4 columns?I saw "loop(i,2,4) {integ1 (col(1), col($(i))); };", but I when I copy it in the window script and press (enter),I can only get"command error"
Thank everyone!
Tackle
2   L A T E S T    R E P L I E S    (Newest First)
Tackle Posted - 10/24/2010 : 12:32:44 AM
Thank you so much,greg! I'm really happy! The script you write really works!Now I can deal with my data quickly!
greg Posted - 10/21/2010 : 10:14:46 AM
So the first part of your script would be
// BEGIN SCRIPT
// Subtract first column A entry from entire column
Col(A) = Col(A)-Col(A)[1];
// Similar for B
Col(B) = Col(B)-Col(B)[1];
// Add two columns
worksheet -add 2; // Creates 'C' and 'D' only if 'A' and 'B' exist
// Calculate column C from columns A and B
Col(C) = Col(A)*Col(B);
// Calculate column D from columns A and C
Col(D) = Col(A)*Col(C);
// END SCRIPT

The rest of the script was posted here:
http://www.originlab.com/forum/topic.asp?TOPIC_ID=8989

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