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
Illustration of Customizing plots: Illustration, the bar and barh functions by the default place a width of 0.8 between bars. Whenever called as bar(x,y), the width of 0.8 is

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

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

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

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

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

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

Determine sequence weights for the sequences ACTA, ACTT, CGTT, and AGAT in problem 1 by using Thompson, Higgins, and Gibson method a) compute pairwise distances between sequences

bjjh

function sortrows - sorting strings: The function sortrows sorts each and every row as a block, or group, and it also will work on numbers. Here in this illustration the rows