<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Thanks. In this case I think something isn't right with [array random]. Using the same array, I get very different patterns with the two methods (see attached patch). The difference is obvious with a gaussian distribution, which looks skewed when generated with [array random].</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Best,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">
Peiman</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">
<br></div></div><div class="gmail_extra"><br clear="all"><div><div dir="ltr"><div><br></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div>
<font face="comic sans ms, sans-serif"><b><a href="http://www.peimankhosravi.co.uk" target="_blank">www.peimankhosravi.co.uk</a> || <a href="http://peimankhosravi.co.uk/miscposts.rss" target="_blank">RSS Feed</a> || <a href="http://spectralkimia.wordpress.com/" target="_blank">Concert News</a></b></font></div>
</div></div>
<br><br><div class="gmail_quote">On 22 November 2013 15:48, Miller Puckette <span dir="ltr"><<a href="mailto:msp@ucsd.edu" target="_blank">msp@ucsd.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
There could be something wrong. But array_random_bang() (in x_array.c)<br>
cooks up a pseudorandom number from 0 to 1 (I believe) and then calls<br>
array_quantile_float() with it. That's exactly what connecting random()<br>
to array_quantile in a patch should be doing.<br>
<br>
cheers<br>
<span class="HOEnZb"><font color="#888888">Miller<br>
</font></span><div class="im HOEnZb"><br>
On Fri, Nov 22, 2013 at 09:38:59AM +0000, peiman khosravi wrote:<br>
> Thank you very much. That does the trick.<br>
><br>
> Though, [array random] doesn't seem to be working as I expected. Am I right<br>
> to think that it should produce the same result as [array quantile] fed<br>
> with uniformly distributed random values? If so I'm getting very different<br>
> results here.<br>
><br>
> Thanks<br>
> Peiman<br>
><br>
><br>
><br>
><br>
</div><div class="HOEnZb"><div class="h5">> *<a href="http://www.peimankhosravi.co.uk" target="_blank">www.peimankhosravi.co.uk</a> <<a href="http://www.peimankhosravi.co.uk" target="_blank">http://www.peimankhosravi.co.uk</a>> || RSS Feed<br>
> <<a href="http://peimankhosravi.co.uk/miscposts.rss" target="_blank">http://peimankhosravi.co.uk/miscposts.rss</a>> || Concert News<br>
> <<a href="http://spectralkimia.wordpress.com/" target="_blank">http://spectralkimia.wordpress.com/</a>>*<br>
><br>
><br>
> On 22 November 2013 04:16, Miller Puckette <<a href="mailto:msp@ucsd.edu">msp@ucsd.edu</a>> wrote:<br>
><br>
> > I think the patch is occasionally (once every 512 times on average) sending<br>
> > zero to "array quantile" which then outputs the index of the first nonzero<br>
> > number in the table -- in this case a point with probability about 1e-45.<br>
> ><br>
> > Maybe try random 1e8 (or so) and divide by 1e8 to get a more continuous,<br>
> > less grainy random sample out of the array.<br>
> ><br>
> > cheers<br>
> > Miller<br>
> ><br>
> > On Fri, Nov 22, 2013 at 01:51:19AM +0000, peiman khosravi wrote:<br>
> > > Hello,<br>
> > ><br>
> > > Has anyone got any experience with [array quantile]?<br>
> > ><br>
> > > I'm getting some strange results and I've done everything I can think of.<br>
> > ><br>
> > > I've attached a patch that should clarify the problem. Basically,<br>
> > > sometimes, not always, [array quantile] returns some weird numbers that I<br>
> > > can't explain.<br>
> > ><br>
> > > And a related issue: array random doesn't seem to be doing what it should<br>
> > > be doing. It returns very different values, compared with quantile fed<br>
> > with<br>
> > > random values between 0 and 1. Again, there is an example of what I mean<br>
> > in<br>
> > > the attached patch.<br>
> > ><br>
> > > Thanks<br>
> > > Peiman<br>
> > ><br>
> > ><br>
> > > *<a href="http://www.peimankhosravi.co.uk" target="_blank">www.peimankhosravi.co.uk</a> <<a href="http://www.peimankhosravi.co.uk" target="_blank">http://www.peimankhosravi.co.uk</a>> || RSS Feed<br>
> > > <<a href="http://peimankhosravi.co.uk/miscposts.rss" target="_blank">http://peimankhosravi.co.uk/miscposts.rss</a>> || Concert News<br>
> > > <<a href="http://spectralkimia.wordpress.com/" target="_blank">http://spectralkimia.wordpress.com/</a>>*<br>
> ><br>
> ><br>
> > > _______________________________________________<br>
> > > <a href="mailto:Pd-list@iem.at">Pd-list@iem.at</a> mailing list<br>
> > > UNSUBSCRIBE and account-management -><br>
> > <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br>
> ><br>
> ><br>
<br>
> _______________________________________________<br>
> <a href="mailto:Pd-list@iem.at">Pd-list@iem.at</a> mailing list<br>
> UNSUBSCRIBE and account-management -> <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br>
<br>
</div></div></blockquote></div><br></div>