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
Strings as Vectors: The Strings are considered as vectors of characters-or in another words, a vector in which each and every element is a single character-so numerous vector

Counting in a While Loop: Whenever it is not known ahead of the time how many values will be entered into the script, it is often essential to count the number of values which

Illustration of Advanced file input and output: For illustration, to refer to the third number in the first element of the cell array: >> subjdata{1}(3) ans =

Dimensions - matrix: The size and length functions in the MATLAB are used to find array dimensions. Length function returns the number of elements in the vector. The size func

User input in the while loop: Here is an illustration of running this script: >> readonenum Enter a positive number: -5 Invalid! Enter a positive number: -2.2

This project requires you to use the ideas of Chapter 25 regarding maximization of a function. Here we assume that evolution has acted to generate highly efficient foragers. By hig

Give the formula for a rational function that has a hole at x=7 & vertical asmptote at x=-3/2

Customizing Plots : There are numerous ways to customize figures in the Figure Window. On clicking the Plot Tools icon will bring up the Property Editor & Plot Browser, with ma

Script a MATLAB program which meets the following speci cations: The program expects an input of a two-variable real-valued continuous function f : R^2--> R The program is to cal

Matrix of Plots: The other function which is very useful with any type of plot is subplot that creates a matrix of plots in the present Figure Window. The three arguments are