Median, MATLAB in Statistics


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 =


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
Areacirc function: The areacirc function can be called from the Command Window as shown here, or from a script. Here is a script which will prompt the user for the radius of o

Curve Fitting: The data is fundamentally either discrete or continuous. In most of the applications, data is sampled, for illustration, The temperature recorded every ho

Illustration of Indexing into vectors of structures: For illustration, the function to print the information from packages has been modified therefore in addition to the vecto

Polynomials: Simple curves are polynomials of various degrees, or orders. The degree is the integer of the highest exponent in the expression. The illustrations are as follows

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

Program of Persistent variables: The program below elaborates this. The script calls a function func1 that initializes a variable count to 0, then increment it, and print the

Generic code for Reading from Files: The generic code to complete this is as shown below:   fid = fopen('filename'); if fid == -1    disp('File open not suc

Debugging Techniques: Any error in the computer program is called a bug. This word is thought to date back to the 1940s, whenever a problem with an early computer was found to

Illustration of Nested loops: Running the script shows the output: >> printstars ***** ***** ***** The variable rows identifies the number of rows to print, and

Functions which return Values versus printing: Also, the function which computes and returns values (throughout the output arguments) does not generally print them; that is le