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 logical built-in functions: The function find returns the indices of a vector which meet certain criteria. For illustration, to find all the elements in a vect

User input in the while loop: Here is an illustration of running this script: >> readonenum Enter a positive number: -5 Invalid! Enter a positive number: -2.2

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

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

Histogram: The histogram is a particular type of bar chart which shows the frequency of occurrence of the values within a vector. The Histograms use what are known as bins to

Differentiation: The derivative of a function y = f(x) can be written as follows or f  '(x) and is defined as the rate of change of the dependent variable y with respe

Write a MATLAB function [d1, u1, l1, c1, r1] = NaiveGaussArrow(d, u, l, c, r) that takes as input the 5 vectors de ned above representing A. This function performs Naive Gauss redu

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

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

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