Histogram - plot functions, MATLAB in Mathematics

Histogram:

The histogram is a particular type of bar chart which shows the frequency of occurrence of the values within a vector. The Histograms use what are known as bins to collect values which are in given ranges. The MATLAB has a function to generate a histogram, hist. Calling the function with the form hist(vec) by default take the values in the vector vec and place them into 10 bins (or, hist(vec,n) will place them in n bins) and plots this, which is as shown in figure.

2398_Histogram.png

>> vec = randint(1,12,[1 10])

vec =

10  8  2  5  10  10  5  9  1  4  9  1

>> hist(vec)

In this illustration, the numbers range from 1 to 10 in the vector, therefore there are 10 bins in the range from 1 to 10. The heights of the bins present the number of values which fall within that specific bin. The hist function really returns values; the first returned is a vector showing how many of the values from the original vector fall in each of the bins:

>> c = hist(vec)

c =

2  1   0  1  2  0  0  1  2  3

The bins in a histogram are not essentially all of similar width. The Histograms are used for statistical analyses on data.

Posted Date: 10/22/2012 1:45:57 AM | Location : United States







Related Discussions:- Histogram - plot functions, Assignment Help, Ask Question on Histogram - plot functions, Get Answer, Expert's Help, Histogram - plot functions Discussions

Write discussion on Histogram - plot functions
Your posts are moderated
Related Questions
Illustration of nested function: The output arguments are distinct from variables. The scope of an output argument is merely the nested function; and it cannot be used in the

Fliplr function: The fliplr function "flips" the matrix from left to right (in another words the left-most column, the first column, become the last column and so on), and the

Symbolic Expression The solve function solves an equation and returns the solution(s) as symbolic expressions. The answer can be converted to numbers by using any numeric funct

Illustration of a recursive function: illustration is of a recursive function which does not return anything, but simply prints. The below function prtwords receives a sentenc

Standard Deviation The standard deviation is the square root of variance: The built-in function in a MATLAB for the standard deviation is known as std; the standard dev

How do I write a product series running from i to n of x''s using a for loop?

Illustration of Standard Deviation The less spread out the numbers are, therefore smaller the standard deviation will be, as it is a way of determining the spread of the data.

Strcat function - Concatenation : The strcat function, though, will eliminate the trailing blanks from strings before concatenating. Note that in these illustrations, the trail

bar and barh functions: For a matrix, the bar and barh functions will group altogether the values in each and every row. The illustration is as shown: rm = randint(2,4,[1

Built in recursive function in MATLAB: We have seen that the built-in function in MATLAB to compute factorials, termed as the factorial and we know how to implement the iterat