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
Passing arguments to functions: In all these functions examples faraway, at least one of the arguments was passed in the function call to be the value(s) of the equivalent inp

Subfunctions: Though, it is possible to have more than one function in a given M-file. For illustration, if one function calls the other, the first function would be the prima

Passing Structures to Functions: The whole structure can be passed to a function, or separate fields can be passed. For illustration, here are the two distinct versions of a f

Function fieldnames - structure functions: The function fieldnames will return the names of the fields which are contained in the structure variable. >> pack_fields = fiel

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

Preallocating a Vector: There are necessarily two programming techniques that can be used to simulate the cumsum function. One technique is to begin with an empty vector and c

Illustration of anonymous functions: Dissimilar functions stored in the M-files, when no argument is passed to an anonymous function, the parentheses should still be in the fu

Illustration of symbolic variable: When, on the other hand, z is a symbolic variable to start with, quotes are not required around the expression, and the words are automatica

A matlab function to calculate filter order

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