agreeing with wunder - I don't know the application, but I think almost always, a set of linear approximations over a few ranges would be ok (and you could increase the number of ranges until it was), and will be faster.
And if you need just one equation, a sigmoid function will do the trick, such as 110 - 50((x-100)/20)/(sqrt(1+((x-100)/20)^2)) http://www.wolframalpha.com/input/?i=plot+110+-+50%28%28x-100%29%2F20%29%2F%28sqrt%281%2B%28%28x-100%29%2F20%29 ^2%29%29%2C+x%3D0..200 Regards Kent Fitch On Wed, Feb 15, 2012 at 6:17 AM, Walter Underwood <wun...@wunderwood.org>wrote: > In practice, I expect a linear piecewise function (with sharp corners) > would be indistinguishable from the smoothed function. It is also much > easier to read, test, and debug. It might even be faster. > > Try the sharp corners one first. > > wunder > > On Feb 14, 2012, at 10:56 AM, Ted Dunning wrote: > > > In general this kind of function is very easy to construct using sums of > basic sigmoidal functions. The logistic and probit functions are commonly > used for this. > > > > Sent from my iPhone > > > > On Feb 14, 2012, at 10:05, Mark <static.void....@gmail.com> wrote: > > > >> Thanks I'll have a look at this. I should have mentioned that the > actual values on the graph aren't important rather I was showing an example > of how the function should behave. > >> > >> On 2/13/12 6:25 PM, Kent Fitch wrote: > >>> Hi, assuming you have x and want to generate y, then maybe > >>> > >>> - if x < 50, y = 150 > >>> > >>> - if x > 175, y = 60 > >>> > >>> - otherwise : > >>> > >>> either y = (100/(e^((x -50)/75)^2)) + 50 > >>> http://www.wolframalpha.com/input/?i=plot++%28100%2F%28e > ^%28%28x+-50%29%2F75%29^2%29%29+%2B+50%2C+x%3D50..175 > >>> > >>> > >>> - or maybe y =sin((x+5)/38)*42+105 > >>> > >>> > http://www.wolframalpha.com/input/?i=plot++sin%28%28x%2B5%29%2F38%29*42%2B105%2C+x%3D50..175 > >>> > >>> Regards, > >>> > >>> Kent Fitch > >>> > >>> On Tue, Feb 14, 2012 at 12:29 PM, Mark <static.void....@gmail.com<mailto: > static.void....@gmail.com>> wrote: > >>> > >>> I need some help with one of my boost functions. I would like the > >>> function to look something like the following mockup below. Starts > >>> off flat then there is a gradual decline, steep decline then > >>> gradual decline and then back to flat. > >>> > >>> Can some of you math guys please help :) > >>> > >>> Thanks. > >>> > > > > >