hey guys,
i really need help for a project of mine.i'll write what is whole program about. any ideas who is sufficent to solve problem will be appriciated. thanx from now.
“A histogram is an efficient visualization of the distributions. The construction of histograms is simple. The xaxis is the consecutive intervals; yaxis is the frequencies of data that falls into a small interval (number of data that has a value in this interval).”
In this project, you are going to implement a simple histogram that xaxis is the frequencies of the values in the data that falls into a small interval; yaxis is the consecutive intervals. The user enters 20 values. There are 10 intervals (10 frequency values). And you are going to output the histogram of this data.
The code of the following functions are given, do not manipulate them:
void ReadNumbers(float numbers[]);
int DrawHistogram(int frequency[]);
* ReadNumber function takes a data from the user and assigns the values to array, numbers.
* DrawHistogram prints the character '' as many as the value of the frequency at each row. As you can see in the function, the index of the array increases at each row.
Write only the following functions (without using printf and scanf and do not forget to enter their parameters in function calls in the main() function!!!) :
void FindBounds(float numbers[],float *min,float *max);
int FindFrequency(float numbers[],int frequency[], float min,float max);
* FindBounds function takes three parameters. You are going to find the minimum and maximum value of the data, subtract 2 from minimum value and add 2 to the maximum value (2 is a constant for the epsilon value that enlarges the interval),then assign to the min and max respectively.
* FindFrequency function takes four parameters. The width of each interval is equal. You have 10 consecutive intervals between min and max parameters. Find the width of the intervals (bin width). Find each frequency by calculating the number of intervals greater than the minimum value of the corresponding interval and less than or equal to the maximum value of the corresponding interval. Fill the frequency array in the increasing order of its indexes as the lower bound of each interval increases.
An example for input output form:
Input:
10.9706
8.8090
9.7007
9.1305
9.8413
13.0703
8.7870
7.3053
10.9388
8.1929
10.0718
8.7449
11.0708
11.1058
9.5926
5.8914
10.2651
13.1859
12.0368
6.8392
Output:
Histogram:
x_axis:Frequency, y_axis:Values







