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
 Cumulative standard deviation

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
Jon34 Posted - 12/01/2016 : 09:54:56 AM
Dear all,

How to perform cumulative or window-shifting standard deviation on a column of values?

I would like something analogous to the sum() function where one can define Col(B) = sum(Col(A)) to get a cumulative sum. If I use Col(B)=StdDev(Col(A)) I get the same unique value on every row of Col B.

Cheers.

Origin Ver. and Service Release (Select Help-->About Origin): OriginPro 8.0
Operating System: Windows 7
4   L A T E S T    R E P L I E S    (Newest First)
Jon34 Posted - 12/02/2016 : 05:09:11 AM
Thank you, I've tried the script both from the command line and from a script file. The result is the same as previously, it runs without error but only "--" is displayed in the cells instead of calculated values.
I ended up using another software (GNU Octave) to do this and I pasted the results back in Origin. But for future cases, if someone knows of a way that's compatible with Origin 8, it would come handy.

Cheers
Hideo Fujii Posted - 12/01/2016 : 12:13:38 PM
Hi Jon34,

How about this script?

for(ii=1; ii<=wks.maxRows; ii++) {
  range rr=col(A)[1:ii];
  col(B)[ii]=StdDev(rr);
}
Hope this works.

--Hideo Fujii
OriginLab
Jon34 Posted - 12/01/2016 : 11:56:30 AM
Thank you for your help. This formula doesn't seem to work for me. It generates no error so I suppose the syntax is correct, but the result column is simply filled with "--" where the calculated values should be. Is there a way to run this formula other than in the Set Column Values tool?
Hideo Fujii Posted - 12/01/2016 : 11:12:56 AM
Hi Jon34,

You can try to apply the following formula in the Set Column Values tool:

  StdDev(col(A)[1:i])
I'm not sure if this works in your Origin 8, but at least it works in Origin 2016/2017.

Hope this helps.

--Hideo Fujii
OriginLab

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