Square matrices, MATLAB in Engineering

Square Matrices:

If a matrix has similar number of rows and columns, for illustration, if m == n, the matrix is square matrix. The definitions which follow in this part apply only to the square matrices.

The main diagonal of a square matrix is the set of terms aii for which the row and column indices are similar, for illustration, from the upper left element to the lower right. For illustration, for the matrix below it is the set of numbers 1, 6, 11, & 16.

1636_Square Matrices.png

This is sometimes just called the diagonal. The MATLAB has a function diag which will return the diagonal of a matrix as a column vector.

>> mymat = reshape(1:16,4,4)'

mymat =

 1    2    3    4

 5    6    7    8

 9   10    11   12

13   14   15   16

>> diag(mymat)'

ans =

1   6   11   16

Posted Date: 10/22/2012 2:27:34 AM | Location : United States







Related Discussions:- Square matrices, Assignment Help, Ask Question on Square matrices, Get Answer, Expert's Help, Square matrices Discussions

Write discussion on Square matrices
Your posts are moderated
Related Questions
Executing a program: Running the program would be completed by typing the name of the script; this would call the other functions: >> calcandprintarea Whenever prompt


Example of file ploting data: As the other example, a data file called 'compsales.dat' stores the sales figures (in millions) for divisions in a company. Each line in the f

Example to change the line width from the default: For illustration, to change the line width from the default of 0.5 to 1.5: >> set(hl,'LineWidth',1.5) As long as the

Example of Exponential function modular program: In order to view the distinction in the approximate value for e as n increases, the user kept choosing Limit & entering larger

Data structures: The Data structures are variables which store more than one value. In order to made sense to store more than one value in a variable, the values must in some

Forward elimination: In forward elimination, we want to obtain a 0 in the a 21 position. To accomplish this, we can alter the second line in the matrix by subtracting from it

Algorithm for the function e: The algorithm for the function eoption is as shown: Use the menu function to show the 4 choices. Error-check (an error would take place

Illustration of gauss-jordan: Here's an illustration of performing such substitutions by using MATLAB >> a = [1 3 0; 2 1 3; 4 2 3] a = 1 3 0 2 1 3 4 2

Anonymous Functions: The anonymous function is a very easy, one-line function. The benefit of an anonymous function is that it does not have to be stored in an M-file. This ca