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
 calculate difference in the same column

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
Eicky Z Posted - 02/06/2018 : 6:03:29 PM
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
3   L A T E S T    R E P L I E S    (Newest First)
Eicky Z Posted - 02/07/2018 : 03:49:32 AM
Thank you for the inspiration from CP, I figure it out, it should be:

---------------------------------------------
doc -ef LB
{
col(new name)=diff(col(A))};
---------------------------------------------
Eicky Z Posted - 02/07/2018 : 03:43:08 AM
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


cpyang Posted - 02/06/2018 : 6:49:42 PM
Just use Set Column Values and the function diff will do this, like this



CP

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