Weighted distribution of Numbers

Douglas Ruisaard dougr at telus.net
Mon Aug 5 12:22:11 EDT 2019


Opps.. correction to: "... When I look at the graph of this function using a "k" value of 5 and above, I *thinK* it starts to simulate your desired mapping...."

That should read " ... When I look at the graph of this function using a 'k' value of 3 down to close to zero I *think* starts to simulate your desired mapping...."

Douglas Ruisaard
Trilogy Software
(250) 573-3935


> -----Original Message-----
> From: Douglas Ruisaard [mailto:dougr at telus.net]
> Sent: Monday, August 05, 2019 8:51 AM
> To: 'use-livecode at lists.runrev.com'
> Subject: RE: Weighted distribution of Numbers
> 
> Ralph:
> Although several persons have responded... most far above my "pay-scale" ... Your mention of the audio
> taper rang bell for me.  In the process of simulating an analog audio potentiometer using a digital
> one... I needed to find a formula for an inverse audio taper... and it DID take a math professor to
> finally provide a solution:
> 
> 
>       kx - 1 + sqrt((1 - kx)^2 + 4kx^2)
> 
>   y = ---------------------------------
> 
>                    2kx
> 
> Now referencing the potentiometer "model"...
> "x" is the amount of "rotation" .. from near zero (since dividing by zero is verboten) to 100%.. i.e.
> 360 degrees (which a real analog pot never actually achieves.
> "k" is the "weight" factor ... increasing "k" increases the "severity" of the taper ... more or less
> flattening the higher range which, in turn, causing the "higher" rotation values to have less
> differentiated output values "y" is the output ... in the case of a pot, the resistance
> 
> When I look at the graph of this function using a "k" value of 5 and above, I *thinK* it starts to
> simulate your desired mapping.
> 
> Hope this helps ... quadratic formulae are NOT my thing.  Your mission is to fit this formula into you
> app and data set
> 
> Cheers!
> Douglas Ruisaard
> Trilogy Software
> (250) 573-3935
> 
> 
> >
> > Message: 12
> > Date: Sun, 4 Aug 2019 14:49:09 -0400
> > From: "Ralph DiMola" <rdimola at evergreeninfo.net>
> > To: "'How to use LiveCode'" <use-livecode at lists.runrev.com>
> > Subject: [OT] Weighted distribution of Numbers
> > Message-ID: <003701d54af5$4f8cd410$eea67c30$@net>
> > Content-Type: text/plain;	charset="us-ascii"
> >
> > I have a set of raw numbers(6,000 of them from 0 to 800 or so). It was
> > easy to normalize these numbers from 0 to 100. But as I look at the
> > results I see that there is one at to top(100) and a few in the 90s
> > and many more in the 70s and 80s. I need to make these numbers more
> > evenly distributed and weighted towards the top(so the top few are
> > 100) based on the current distribution of the raw numbers. I'm not a
> > math whiz and not afraid to admit that going beyond linier equations
> > is way over my head. From some searches I see the some sort of
> > nonlinear regression is in order(I think)? Or a apply a log (like an
> > audio log taper of a potentiometer)? I don't know... Can anyone point me in the in the right
> direction?
> >
> > Thanks!
> >
> > Ralph DiMola
> > IT Director
> > Evergreen Information Services
> > rdimola at evergreeninfo.net
> >
> >
> >
> >





More information about the use-livecode mailing list