answersLogoWhite

0


Want this question answered?

Be notified when an answer is posted

Add your answer:

Earn +20 pts
Q: How do you extract a submatrix from a matrix in matlab?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is matlab7.0?

matlab stands for matrix laboratory&is an advanced software. matlab stands for matrix laboratory&is an advanced software.


How matlab is used in imageprocessing?

Matlab is useful in image processing in order to convert the image into a matrix and make several operations on it.


What does matlab stands for?

In their own words, "MATLAB is a high-level language and interactive environment for numerical computation"


How do you determine determinant of matrix using matlab?

d = det(x);


Which is the function of matlab?

matlab stands for matrix laboratory.. the function of matlab to create different types of signal and observe them .and their are so many different functions of matlab like, simulink fuzzy logic,simply arithmetic ,GUI etc


Why matlab is so called matlab?

MatLab means MATrix LABoratory. It converts the signals into matrices and performs various operations on them. Hence, it is used mainly in applications where there is a need to convert data from one form to the other.


What is function of zeros command in matlab?

zeros makes a matrix of the specified dimension, filled with zeros.


String to matrix converting matlab code?

Here is an example code snippet in MATLAB that converts a string into a matrix: str = '123456789'; % input string numChars = length(str); % number of characters in the string matrixSize = ceil(sqrt(numChars)); % calculate the size of the resulting matrix % pad the string with zeros to make it divisible by the matrix size str = [str, num2str(zeros(1, matrixSize^2 - numChars))]; % reshape the string into a matrix matrix = reshape(str, matrixSize, matrixSize); This code takes an input string and calculates the size of the matrix needed to store all the characters. It then pads the string with zeros to make it divisible by the matrix size. Finally, it uses the reshape function to convert the string into a matrix.


What is the formula for determinant of a 3x3 matrix?

To answer this question, let me establish an example 3 x 3 matrix named "A": A= [a b c] [d e f] [g h i] The formula I will give you, called co-factor expansion, works for any size square matrix, so you could use it to find the determinant of a 2 x 2, 3 x 3, all the way up to an n x n matrix. To find the determinant, pick any row or column in the matrix. It will make your work much easier if you choose a row or column that has many zeroes in it. A general notation that is often used to find the determinant of a matrix is to use straight bars in place of the brackets surrounding the matrix contents. So, if I was to say mathematically that I was finding the determinant of the above example matrix, I could write it as: det(A)= |a b c| |d e f| |g h i| This notation will be used in the formula, so it is important to know this. For the sake of an arbitrary example, let us suppose I chose Row 1 of the matrix as my chosen row. To find the determinant of this matrix, I will perform the following calculation: (-1)2(a)|e f| + (-1)3(b)|d f| + (-1)4(c)|d e| |h i| |g i| |g h| This is the specific application of this general formula to the example matrix: (-1)i+j(aij)det(A1) In this formula, i and j are the row and column addresses, respectively, of a given matrix element. So, like in our specific application, when Row 1 was chosen as our subject row, the first term was (-1)1+1(A11)det(A1). The element "a" is in the first row, first column of the matrix, mean i=1 and j=1, therefore the superscript of (-1) is 1+1=2. A11 is simply the value held in the address i=1, j=1 of the matrix A. For this application, A11 was "a". det(A1) is the determinant of the submatrix A1. This submatrix has no formal nomenclature, I simply call it this for ease of explanation. A1 is the matrix created by "crossing out" the row and column that belong to the matrix element A11. In this application, that means it is the submatrix that is left after crossing out a, b, c, d, and g, which is simply the 2 x 2 matrix e,f;h,i. Performing this same process for the remainder of the matrix elements in Row 1 will yield the determinant of the matrix. So, the "generalized" form of the specific application above is: (-1)1+1(A11)det(A1) + (-1)1+2(A12)det(A2) + (-1)1+3(A13)det(A3) where A1 is the submatrix created by crossing out Row 1 and Column 1, A2 is the submatrix created by crossing out Row 1 and Column 2, and A3 is the submatrix created by crossing out Row 1 and Column 3. A final note is how to calculate the determinants of the submatrices. For a 3 x 3 matrix, its submatrices are all 2 x 2. For 2 x 2 matrices, a simple formula exists that makes this easy: |a b| = (ad) - (bc) |c d| For higher-dimension matrices, the submatrices also become larger, making the computation much more intensive.


How does one read data from a text file and create an adjacency matrix with the data in matlab?

You can read data from a text file in a few different ways, but generally you use the "textread" function. The syntax is: C = textread('file','format') where C will be your new text matrix, file is your text file within your matlab directory, and format will depend on the type of data it is (see related link for more). Can't help with the adjacency matrix, sorry.


What are advantages of a sparse matrix?

Using sparse matrices to store data that contains a large number of zero-valued elements can both save a significant amount of memory and speed up the processing of that data. sparse is an attribute that you can assign to any two-dimensional MATLAB matrix that is composed of double or logical elements.The sparse attribute allows MATLAB to:Store only the nonzero elements of the matrix, together with their indices.Reduce computation time by eliminating operations on zero elements.For full matrices, MATLAB stores every matrix element internally. Zero-valued elements require the same amount of storage space as any other matrix element. For sparse matrices, however, MATLAB stores only the nonzero elements and their indices. For large matrices with a high percentage of zero-valued elements, this scheme significantly reduces the amount of memory required for data storage.


What has the author Robert E White written?

Robert E. White has written: 'Elements of Matrix Modeling and Computing with MATLAB' 'Soils for Fine Wines'