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
Example of Symbolic Expression When there is more than one variable, the MATLAB selects which to solve for. In the illustration below, the equation ax 2 + bx = 0 is solved. Th

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

Illustration of Writing variables to a file: For illustration, in the below session in the Command Window, 3 variables are generated; these are then exhibited using who. Then,

Use of string variables: The Characters involve letters of the alphabet, punctuation marks, digits, white space, and control characters. The Control characters are characters

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

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

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).

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

Logical Vectors: The relational operators can also be used with the vectors and matrices. For illustration, let's say that there is a vector, and we want to compare each eleme

sprintf function: The sprintf function works precisely like the fprintf function, but rather than printing it generates a string. Here are some illustrations in which the outp