Indexing, MATLAB in Statistics


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:


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:


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
Logical errors: The Logical errors are more complicated to locate, as they do not result in any error message. The logical error is a mistake in reasoning by the programmer, b

Introduction and Purpose In the lectures and tutorials you have been introduced to a number of probability distributions. You have also learned that modelling any system (such

MENU Function: The MATLAB also has a built-in function known as menu which will display a figure Window with push buttons for the choices. The very first string passed to the

Advanced File Input and output: Where 'format' involves the conversion characters much like those used in the fprintf function. For illustration, to read the file 'subjexp.dat

Operation on file: We concentrate first on the fgetl function that reads strings from the file one line at a time. The fgetl functions afford more control over how the data is

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

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

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

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

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