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
Example of Mode When no value appears more often than any other, the smallest value in the vector will be the mode of the vector. >> shortx = [2 5 1 4]; >> mode(shortx

Help function: Function is computing the two values, there are two output arguments in the function header (i.e., area & circum), that are placed in the square brackets [ ]. A

Mode The mode of a data set is the value which appears most often. The built-in function in a MATLAB for this is known as the mode. >> x = [9 10 10 9 8 7 3 10 9 8 5 10];

Function Stubs: The other common debugging method, which is used when there is a script main program which calls many functions, is to use the function stubs. A function stub

Illustration of reading from files: For illustration, suppose that there is a data file 'subjexp.dat' that has on each line a number followed by thecharacter code. The type fu

Nested Structures: The nested structure is a structure in which at least one of the members is itself a structure. For illustration, a structure for the line segment may co

Illustrations of Sequential search: The two illustrations of calling such function is as shown below: >> values = [85 70 100 95 80 91]; >> key = 95; >> seqsearch

Example of sorting strings: To sort a cell array of strings, also the sort function is used. The illustration is as follows, >> engcellnames = {'Chemical','Mechanical',.

Run-time or execution-time error: The Run-time, or execution-time, errors are found whenever a script or function is executing. With most of the languages, an illustration of

WHILE Loops: The while statement is used as a conditional loop in MATLAB; it is used to repeat an action whenever ahead of the time it is not known how many times the action w