Refer the subset of a matrix, MATLAB in Mathematics

Refer the subset of a matrix:

It is also possible to refer to the subset of a matrix. For illustration, this refers to the first & second rows, second & third columns:

>> mat(1:2,2:3)

ans =

3 4

4 5

 

Using a colon for the row index means that all rows, regardless of how many, and using a colon for the column index means that all columns. For illustration, this refers to the whole first row:

>> mat(1,:)

ans =

2  3  4

and this refers to the whole second column:

>> mat(:, 2)

ans =

3

4

 

Posted Date: 10/18/2012 4:22:25 AM | Location : United States







Related Discussions:- Refer the subset of a matrix, Assignment Help, Ask Question on Refer the subset of a matrix, Get Answer, Expert's Help, Refer the subset of a matrix Discussions

Write discussion on Refer the subset of a matrix
Your posts are moderated
Related Questions
The variance is generally defined in terms of the arithmetic mean as: At times, though, the denominator is defined as n instead of n - 1. The default definition used by t

Built in recursive function in MATLAB: We have seen that the built-in function in MATLAB to compute factorials, termed as the factorial and we know how to implement the iterat

Types of User-defined Functions: We know how to write a user-defined function, stored in an M-file, which computes and returns one value. This is merely one type of the functi

bar and barh functions: For a matrix, the bar and barh functions will group altogether the values in each and every row. The illustration is as shown: rm = randint(2,4,[1

Illustration of a recursive function: illustration is of a recursive function which does not return anything, but simply prints. The below function prtwords receives a sentenc

Illustration of Variance For illustration, for the vector [4, 6, 1, 5], there are n = 4 values therefore n - 1 is 3. The mean of this data set is also 4. The variance will be

Indexed empty matrix: The Individual elements cannot be eliminated from matrices, as matrices always have the similar number of elements in every row. >> mat = [7 9 8; 4 6

Polar Form: Any complex number z = a + bi can be thought of as a point (a,b) or vector in the complex plane in which the horizontal axis is the real part of z, and the vertica

Referring to and Modifying the Matrix Elements: To refer to matrix elements, the row and then the column indices are given in parentheses (always the row index initially and t

Function isreal - complex numbers: The function isreal returns 1 for logical true when there is no imaginary part of the argument, or 0 for false when the argument does have a