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

Program of built-in factorial function: Calling this function yields similar result as the built-in factorial function: >> fact(5) ans =   120 >> factorial(

Example of Minimum and Maximum Value For matrices, the functions min and max operate column wise by the default: >> mat = randint(2,4,[1 20]) mat =    9   10   1

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

Illustration of Minimum and Maximum Value Both of these functions also return the index of the minimum or maximum value; when there is more than one occurrence, it returns the

Animation: In this part we will observe a couple of ways to animate a plot. These are visuals, therefore the outcomes can't really be shown here; it is essential to type these

Writing to Files: There are many lower level functions which can write to files. We will focus on the fprintf function that can be used to write a file and also to append to a

fprintf function - File function: The fprintf function really returns the number of bytes which was written to the file, therefore if you do not want to see that number, suppr

Sorting The Sorting is a process of putting a list in order; either in descending (maximum to minimum), or ascending (minimum to maximum) order. For illustration, here is a li

Function xlsread - file function: The function xlsread will read from the spreadsheet file. For illustration, to read from file just generated: >> ssnums = xlsread('ranexc