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
 calculate difference in the same column
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Eicky Z

3 Posts

Posted - 02/06/2018 :  6:03:29 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver.Origin pro 9 and Service Release (Select Help-->About Origin):
Operating System: Windows

Hi

I want to calculate the difference between two neighbouring values in the same column. Basically it is like col(A) row2 - col(A) row1, then col(A row3 - col(A) row2. Could someone help me to figure it out what to put in the command window?

Thanks!
Eicky

cpyang

USA
1406 Posts

Posted - 02/06/2018 :  6:49:42 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Just use Set Column Values and the function diff will do this, like this



CP
Go to Top of Page

Eicky Z

3 Posts

Posted - 02/07/2018 :  03:43:08 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks! but the tricky thing is that I have 10 worksheets for one analysis, that's the reason why I prefer to use the batched command window instead of 'set column values'.

Thanks, anyway.
quote:
Originally posted by cpyang

Just use Set Column Values and the function diff will do this, like this



CP


Go to Top of Page

Eicky Z

3 Posts

Posted - 02/07/2018 :  03:49:32 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you for the inspiration from CP, I figure it out, it should be:

---------------------------------------------
doc -ef LB
{
col(new name)=diff(col(A))};
---------------------------------------------
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