-
jbm1991
Hi there,
I am completely new to pure data so forgive me if I'm missing something here but I need to calculate the variance of a large list of numbers, over 5000 infact. However if I use the variance object then it gives me the wrong answer, but if I run it again without closing puredata it gives me the correct answer. Why does it need to be run twice? Am I just missing something or is there an error in pure data?
In the event I'm not just missing something and I do need to run it twice how to I go about getting it to run twice after clicking the bang only once. Is there a loop of some sort I could use?
Also, how would I write just the one final value to a file, rather than the entire list of numbers.
Thanks very much for any help
-
jbm1991
Thanks for that, yeah I thought it was an error in the way it was implemented as I had done some tests on the outputs of various bits of the patch. That patch you have made is great, thanks
-
jbm1991
oh right, well that makes sense i guess. Any ideas why it only gets the variance correct after 2 passes through though?
-
jbm1991
Thanks for replying. So if I reverse the message order with a trigger that may fix my problem? I still don't understand what the number after variance means or how it can get the correct answer after 2 passes but not one.
-
jbm1991
Thanks for the reply here is the patch. I need it to save like 1 row of means and 1 row of variances to a file at the end. But as I say the variances only work after a second run through.
EDIT: what does the number after variance actually do? like [variance 10] or [variance 1000] say?