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
Illustration of Spreadsheet Files: This reads the numbers in a double vector variable nums and the text in a cell array txt (the xlsread function forever returns the numbers f

Common form of the switch statement: The common form of the switch statement is as shown below:   switch switch_expression   case caseexp1    action1   case cas

Using Functions with the Vectors and Matrices: As MATLAB is written to work with the vectors and matrices, the whole vector or matrix can be passed as an argument to the funct

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

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 Writing to files: Here is the other illustration in which a matrix is written to a file. At First, an arbitrary 2 × 4 matrix is generated, and then it is writt

Error-checking for integers: illustrations of running this script as shown below: >> readoneint Enter an integer: 9.5 Invalid! Enter an integer: 3.6 Invalid

Minimum and Maximum Value The MATLAB has built-in functions for numerous statistics. For illustration, min and max to find the minimum or maximum value in a data set. >> x

strvcat function - concatenation: The function strvcat will concatenate it vertically, that means that it will generate a column vector of the strings.   >> strvcat(fir

Three-Dimensional Plots: The MATLAB has many functions which will display three-dimensional plots. Most of these functions have similar name as corresponding two-dimensional p