[PD] Generate a Gaussian curve

Liam Goodacre liamg_uw at hotmail.com
Sun Apr 17 14:59:39 CEST 2016


Working now, thanks Claude!

> To: pd-list at lists.iem.at
> From: claude at mathr.co.uk
> Date: Sun, 17 Apr 2016 12:10:04 +0100
> Subject: Re: [PD] Generate a Gaussian curve
> 
> Hi Liam,
> 
> On 17/04/16 07:52, Liam Goodacre wrote:
> > Hi all
> >
> > This is basically just a maths problem. I'm looking to fill an array with a  Gaussian curve and be able to control the sigma value (and any other relevant variables), but my math skills aren't good enough! I tried this, based off of the standard function listed on Wikipedia:
> >
> > expr $f2 * pow (2.71828, -(($f1-$f3)^2/(2*$f4^2)))
> 
> I think in expr, ^ means bitwise xor instead of power.  I'd rewrite it as:
> 
> expr $f2*exp(-($f1-$f3)*($f1-$f3)/(2*$f4*$f4))
> 
> >
> > but there must be a mistake because I'm not getting the right curve.
> >
> > Can anyone help?
> >
> > (NB: The point is to find a replacement for the [gauss] external, using the nice new [array random] function).
> >
> > Liam
> 
> 
> Claude
> -- 
> https://mathr.co.uk
> 
> 
> _______________________________________________
> Pd-list at lists.iem.at mailing list
> UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20160417/38c07258/attachment.html>


More information about the Pd-list mailing list