Illustration of median, MATLAB in Statistics

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, scrambling the order of the values in the first illustration will still answer in a median value of 5.

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

    ans =

       5

Posted Date: 10/22/2012 7:05:08 AM | Location : United States







Related Discussions:- Illustration of median, Assignment Help, Ask Question on Illustration of median, Get Answer, Expert's Help, Illustration of median Discussions

Write discussion on Illustration of median
Your posts are moderated
Related Questions
Tracing: Sometimes, when a program has loops and/or selection statements and is not running properly, it is helpful in the debugging process to know exactly which statements h

Sequential Search: A sequential search is completed by looping through the vector element-by-element starting from the beginning, looking for the key. Usually the index of the

Types of errors: There are some various kinds of errors which can occur in a program, that fall into the categories of run-time errors, syntax errors, and logical errors. T

Example of customizing plots: As the other illustration of customizing plots, the pieces of a pie chart can be "exploded" from the rest. In this situation, the two vectors are

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 Nested functions: For illustration, the function below computes and returns the volume of a cube. Three arguments are then passed to it, for the width and length of

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

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

Execution of persistent variables: The functions can also be called from the script or from the Command Window, as shown here. For illustration, the functions are called first

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