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
Complex numbers: A complex number is commonly written in the form z = a + bi here a is known as the real part of the number z, b be the imaginary part of z, and i is √-1

Find Minimum and Maximum for each row To find the maximum (or minimum) for each row, the dimension of 2 (that is how a MATLAB refers to rows) can be identified as the third arg

Print an imaginary number: To print an imaginary number, the function disp will show both parts automatically: >> disp(z1)    4.0000 + 2.0000i The function fprint

Strcat function - Concatenation : The strcat function, though, will eliminate the trailing blanks from strings before concatenating. Note that in these illustrations, the trail

Plot Functions: Faraway, we have plotted to generate two-dimensional plots and bar to generate bar charts. We have seen how to clear the Figure Window by using clf, and how to

Script a MATLAB program which meets the following speci cations: The program expects an input of a two-variable real-valued continuous function f : R^2--> R The program is to cal

Illustration of Labels and prompts: The program below prompts the user for endpoints (x1, y1) and (x2, y2) of a line segment, and computes the midpoint of the line segment, th

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

Nested IF-ELSE statements: The if-else statement is used to select between the two statements. In order to select from more than two statements, the if-else statements can als

User-defined functions: Therefore, although many functions compute and return values, some do not. A few functions rather merely accomplish a task. Regardless of what type of