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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 The script of integrals of the Cols Y with Col X
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Tackle

China
6 Posts

Posted - 10/20/2010 :  12:29:25 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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

greg

USA
1378 Posts

Posted - 10/21/2010 :  10:14:46 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

Tackle

China
6 Posts

Posted - 10/24/2010 :  12:32:44 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you so much,greg! I'm really happy! The script you write really works!Now I can deal with my data quickly!
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000