ابحث فى المدونة

أحدث المواضيع



MATLAB Basics3( تابع اساسيات الماتلاب)

third
Matrices and Vectorsالمصفوفات والمتجهات

A matrix is a two-dimensional rectangular array of real or complex numbers

I. Entering matrices from command line or m-file

To enter a matrix, you have only to follow a few basic conventions:
•Separate the elements of a row with blanks or commas.
•Use a semicolon to indicate the end of each row.
•Surround the entire list of elements with square brackets, [ ].



Example:


Notes
1)
The element in row i and column j of matrix A is denoted by A(i,j) (row-column subscript).
•It is also possible to refer to the elements of a matrix with a single subscript, A(k), (element columwise index)
."end" specifies maximum index value.

2) 
.Any MATLAB expression can be entered as a matrix element
3) 
.If you store a value in an element outside of the matrix (using row-column subscript only), the size increases to accommodate the newcomer, for example :
4)
.If you try to use the value of an element outside of the 
matrix,for example:

II. Generating Matrices Using Built-in Functions 
Example:




 III. Concatenation
Concatenation is the process of joining small matrices to make bigger ones. The pair of square brackets, [ ], is the concatenation operator. For example

Example:

IV. Empty Matrices
It is a matrices and arrays where one, but not all, of the dimensions is zero.
-To define an empty matrix
(U=[ ]        or      E = zeros(0,5

To be continued ……..





0 comments:

data: commentLabel/
Related Posts Plugin for WordPress, Blogger...