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
Execution steps: Whenever the program is executed, the steps below will take place: The script calcandprintarea starts executing. The calcandprintarea calls the readr

Illustration of Vectors of structures: In this illustration, the packages are vector which has three elements. It is shown as a column vector. Each and every element is a stru

Changing Case: The MATLAB has two functions which convert strings to all uppercase letters, or all lowercase, known as the upper and lower. >> mystring = 'AbCDEfgh';

Built-in colormaps: The MATLAB has numerous built-in colormaps which are named; the reference page on colormap shows them. Calling the function colormap without passing any ar

Application: Menu driven Modular Program Numerous longer, more involved programs which have interaction with the user are menu-driven, that means that the program prints a men

Illustration of initializing the data structure: illustration of initializing the data structure by preallocating is here as shown: >> cyls(3) = struct('code', 'c', 'dimen

Program of passing arguments to functions: This was an illustration of a function which did not receive any input arguments nor did it return any output arguments; it easily a

Write a program to examine exponential function: We will write a program to examine the value of e and the exponential function. It will be a menu-driven. The menu options wil

Function used in sound files: The MATLAB has numerous other functions which let you read and play sound or audio files. In the audio files, sampled data for each audio channel