I have suppose N samples of data obtained in an analysis and need to map into K (predefined) number of bins i.e. samples uniformly.
For eg: I have N=31 and K=30 then i should have values of 1-14 and 15-30 bins stored as 1-14 and 17-31 of N. But for bin number 15 i should have the average of N=15,16. This distributes the samples uniformly.
May i know the solution for the same?