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
Uses of Function handles: The Function handles can also be generated for functions other than anonymous functions, both built-in & user-defined functions. For illustration, th

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

deblank function: The deblank function eliminates only trailing blanks from the string, not leading the blanks. The strtrim function will eliminate both the leading and traili

calcrectarea subfunction: function call: area = calcrectarea(len,wid); function header: function area = calcrectarea(len, wid)   In the function call, the two arg

Illustration of Graphics properties: A particular property can also be exhibited, for illustration, to view the line width:     >> get(hl,'LineWidth')     ans =

Storing Strings in Cell Arrays: The one good application of a cell array is to store strings of various lengths. As cell arrays can store various types of values in the elemen

Converting between the String and Number types: The MATLAB has many functions which convert numbers to strings in which each character element is a separate digit, and vice ve

FOR Loop: The for loop, or the for statement, is used whenever it is essential to repeat statement(s) in the script or function, and whenever it is known ahead of time how man

Illustration of Image processing: This displays that there are 64 rows, or in another word, 64 colors, in this specific colormap. It also displays that the first five colors a

Plotting from a Function: The following function creates a Figure Window as shown in figure, which shows various types of plots for similar y vector. The vector is passed as a