I'm new to java, never programmed before, and I'm having some trouble with this code. It tells me that it requires a int[] value, but is getting a int value. I'm not too sure how to fix this.
Thank you in advance for any help you can provide.
Here is the section of code:
public static int[] createBucketCounts(double [] data, int n) {
double min = DescriptiveStatistics.getMinimum(data);
double max = DescriptiveStatistics.getMaximum(data);
double range = max - min;
double width = range / 10;
I am trying to take an array of numbers, divide them into ten "buckets" - ranges of numbers actually - and have each bucket keep a tally, and turn that tally into an array.
Bookmarks