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 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

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

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

Nested Functions: We have seen that the loops can be nested, that means that one inside of the other, functions can be nested. The terminology for nested functions is that an

Working of Editor and debugger: Editor/Debugger, or commands can be typed from Command Window. For illustration, the dbstop command below will set a breakpoint in the fifth li

Polynomials: Simple curves are polynomials of various degrees, or orders. The degree is the integer of the highest exponent in the expression. The illustrations are as follows

Median The median is defined only for a data set which has been sorted first, that means that the values are in order. The median of a sorted set of data values (n) is defined

Input in a While Loop: The script below repeats the procedure of prompting a user, the reading in a positive number, and echo-printing it, as long as the user properly enters

Mode The mode of a data set is the value which appears most often. The built-in function in a MATLAB for this is known as the mode. >> x = [9 10 10 9 8 7 3 10 9 8 5 10];

Statistics There are numerous statistical analyses which can be executed on data sets. In MATLAB software, the statistical functions are in the data analysis help topic known a