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
User-defined functions: Therefore, although many functions compute and return values, some do not. A few functions rather merely accomplish a task. Regardless of what type of

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

Types of User-defined Functions: We know how to write a user-defined function, stored in an M-file, which computes and returns one value. This is merely one type of the functi

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

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

The variance is generally defined in terms of the arithmetic mean as: At times, though, the denominator is defined as n instead of n - 1. The default definition used by t

Function fopen - file function: The permission string in the call to the fopen function identifies that the file is opened for writing to it. Just as when reading from a file,

Writing and Reading Spreadsheet Files: The MATLAB functions xlswrite & xlsread will write to and read from the spreadsheet files which have the extension .xls. For illustratio

Functions to create special matrices: The MATLAB also has various functions which create special matrices. For illustration, the zeros function generates a matrix of all zeros

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