Bar and barh functions - plot functions, MATLAB in Mathematics

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 50])

rm =

 8 19 43 25

35 44 30 45

bar(rm)

gives the plot as shown in the figure.

165_bar and barh functions.jpg

Note that the MATLAB groups altogether the values in the first row and then in the next row. It cycles through colors to differentiate the bars. The 'stack' option will stack instead of grouping the values; therefore the y value presented by the top of the bar is the addition of the values from that row as shown in fgure.

bar(rm,'stack')

2334_bar and barh functions1.png

 

Posted Date: 10/22/2012 1:44:32 AM | Location : United States







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

Write discussion on Bar and barh functions - plot functions
Your posts are moderated
Related Questions
Differentiation: The derivative of a function y = f(x) can be written as follows or f  '(x) and is defined as the rate of change of the dependent variable y with respe

Nested IF-ELSE statements: The if-else statement is used to select between the two statements. In order to select from more than two statements, the if-else statements can als

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.

Illustration of Variance For illustration, for the vector [4, 6, 1, 5], there are n = 4 values therefore n - 1 is 3. The mean of this data set is also 4. The variance will be

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

Illustration of Logical vectors: Calling the function appears to return similar vector as simply vec > 5, and summing the result still works to determine how many elements wer

Example of Minimum and Maximum Value For matrices, the functions min and max operate column wise by the default: >> mat = randint(2,4,[1 20]) mat =    9   10   1

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

fprintf function - File function: The fprintf function really returns the number of bytes which was written to the file, therefore if you do not want to see that number, suppr

Built-in functions for Complex numbers:   We know that in MATLAB both i and j are built-in functions which return √-1 (therefore, they can be thought of as built-in constants).