Index vector, MATLAB in Statistics

Index vector:

The index vector is then used as the indices for original vector. To get grades vector in ascending order, the indices used would be grades (2), grades (5), and so forth. By using the index vector to complete this, grades (grade_index(1)) would be the minimum grade, 70, and grades (grade_index(2)) would be the second lowest grade. In common, grades (grade_index(i)) would be the ith lowest grade. To generate these in MATLAB:

 

>> grades = [85 70 100 95 80 91];

>> grade_index = [2 5 1 6 4 3];

>> grades(grade_index)

ans =

70 80 85 91 95 100

 

 

 

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







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

Write discussion on Index vector
Your posts are moderated
Related Questions
Example of Functions which complete a task: For illustration, the function below just prints the number arguments passed to it in a sentence format: As this function i

Illustration of nested for loops and the if statements: For illustration,when the file contains: 33   -11  2  4      5   9 22     5  -7  2     11    3 the outco

Function polyval - interpolation: The function polyval can then be used to compute the polynomial at particular values. For illustration, we could compute at every value in th

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

Advanced File Input and Output: In that section, we saw how to read the values entered by user using the input as well as the output functions disp and fprintf, that shows inf

Index vector: The index vector is then used as the indices for original vector. To get grades vector in ascending order, the indices used would be grades (2), grades (5), and

Illustration of Mode When there is more than one value with similar (highest) frequency, then the smaller value is mode. In the case below, as 3 and 8 appear twice in the vecto

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

Nested for Loops: The action of a loop can be any of the valid statement(s). Whenever the action of a loop is the other loop, this is known as nested loop. As an illustrati

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