Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: std for growing columns of a matrix
Replies: 2   Last Post: Apr 25, 2014 4:25 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
mick strife

Posts: 2
Registered: 4/25/14
std for growing columns of a matrix
Posted: Apr 25, 2014 2:51 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hello :),

i am looking for an effective way to calculate following problem:

for i=1:1000
tmp=data(1:i,:);
rsStd(i)=std(tmp(:));
end

"data" is a matrix with k rows and j columns. What i dont want is to calculate the std for every column. What i would need is the std for a growing data range. By each loop step the data range for the calculation of the std grows as you can see in the code snippet.

Does anyone know probably a faster solution and could give me a hint? I am thinking something with vectorization but currently i have no idea. Many thanks!



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.