Indexing, MATLAB in Statistics

Indexing:

The Indexing is an alternate to sort a vector. With indexing, the vector is left in its original order. An index vector is used to point values in the original vector in the preferred order.

For illustration, for a vector of exam grades as shown below:

1942_Indexing.png

In ascending order, the minimum grade is in element 2; the next minimum is in element 5, and so forth. The index vector grade_index gives this order:

1980_Indexing1.png

Posted Date: 10/22/2012 7:50:01 AM | Location : United States







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

Write discussion on Indexing
Your posts are moderated
Related Questions
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

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

Illustration of Indexing: Though, rather than of creating the index vector manually as shown here, the process to initialize the index vector is use to a sort function. The al

fopen function - file function: The fopen opens the file for reading. The fscanf then reads each line one double and one character, and put each pair in individual columns in

fscanf function - file function: The fscanf reads matrix variable mat columnwise from the file specified by fid. The 'format' involves conversion characters much similar to th

Illustration of Input in a for loop: In this illustration, the loop variable iv iterates through the values 1 through 3, therefore the action is repeated three times. The acti

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

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

Indexing: The Indexing is an alternate to sort a vector. With indexing, the vector is left in its original order. An index vector is used to point values in the original vecto

Example of Function stubs: The three functions have not so far been written, though, therefore the function stubs are put in place so that the script can be executed and teste