Median, MATLAB in Statistics

Median

The median is defined only for a data set which has been sorted first, that means that the values are in order. The median of a sorted set of data values (n) is defined as the value in the middle, when n is odd; or the average of two values in the middle, when n is even. For illustration, for the vector [1 4 5 9 12], the middle value is 5. The function in a MATLAB is known as median:

>> median([1 4 5 9 12 ])

ans =

    5

Posted Date: 10/22/2012 7:04:07 AM | Location : United States







Related Discussions:- Median, Assignment Help, Ask Question on Median, Get Answer, Expert's Help, Median Discussions

Write discussion on Median
Your posts are moderated
Related Questions
Core Objects: The Core Objects in MATLAB are the very fundamental graphics primitives. The description can be found under the MATLAB Help: Under the Contents tab, click the Ha

Example of Vectorizing: Likewise, for an operation on a matrix, a nested loop would be needed; for illustration, supposing a matrix variable mat: [r c] = size(mat); for

Functions which complete a task without returning Values: Most of the functions do not compute values, but instead of accomplish a task like printing formatted output. As thes

Combining Nested FOR Loops and the IF Statements: The statements inside a nested loop can be any of the valid statement, involving any selection statement. For e.g., there can

Vectorizing: In most of the cases in MATLAB, loops are not essential. As MATLAB is written specifically to work with the vectors and matrices, most operations can be completed

Location of a rectangle - graphics objects: The location of a rectangle is [x y w h], where x and y are the coordinates of the lower left point, here w is the width, and h is

Index vector: The index vector is then used as the indices for original vector. To get grades vector in ascending order, the indices used would be grades (2), grades (5), and

Illustration of Median When the vector is not in sorted order to start with, the median function will still return the right answer (it will sort the vector automatically). For

Illustration of Customizing plots: Illustration, the bar and barh functions by the default place a width of 0.8 between bars. Whenever called as bar(x,y), the width of 0.8 is

Persistent Variables: Generally, whenever a function stops executing, then the local variables from that function are cleared. That means that each and every time a function i