I'm pretty new to Mathematica, and I'm mainly a programmer so I don't have a lot of knowledge about maths.
I want to generate a set of UNIQUE incremental numbers (series) according to the following rules:
- From N1 to N2 INCLUSIVE
- The count is exactly N e.g. I want 5000 numbers
- Scales according to a function i.e. I want the distance between each number and the following number to increase sequentially for example I want it to scale such that the first 25% of the range contains 50% of the number (numbers close together) then next 25% contains 30% of the numbers, then 15% then 5%, that way as you move forward the numbers are stretched further apart.
Thanks,
SM
EDIT: The actual situation that makes me think I need this is:
I'm simulating a slot game where you can win an amount of money each spin, I get a long list of all the wins and their frequencies, now I want to "redistribute" or "group up" those range of wins into a smaller set, for example only 5000 numbers instead of having like 1M, I want to do that by basically generating a series as specified in my question and then "grouping" each of the real wins into the closest number in the generated set, so for example 0.9, 1 and 1.1 would be grouped into just 1 with frequency 3 (assuming that 1 is in the generated set of numbers)
EDIT: Now that my question has been answered, my next step should be:
- My new set of numbers has a weights list all initialised to 0 {0,0,0,...}
- Go through my original list and for each number I get its weight and add it to the weight of the nearest number in the new set.
For example:
Original: {1,2,3,4,5,...,10} (from 1 to 10)
Weights: {1,1,1,1,..} (all have equal weight)
New set: {1,10}
so the weights for the new set would be calculated:
{1 to 5} get "rounded" to 1 (closest number)
{6 to 10} get "rounded" to 10 (closest number)
New weights: {5,5}
I can do this in code easily but I'm sure there must be a way to do this in Mathematica? Should I post this as a new question? I don't want to spam


Piecewisespreading your values over your Range N. Just in case: Rule of Thumb - never useFor- loops – Sascha Nov 30 '12 at 20:56GatherByorBinCount, orBinList- depending on what exactly your output should look like. – Sascha Nov 30 '12 at 23:38