01 Matlab Commands
01 Matlab Commands
01 Matlab Commands
ا
ت
اب
١
ا
ات )
وف...أرم#
(.....
& ' ()*+ف وأ%ة
%د اف و%د ا%-ة ) ',أ+د ا أو
/ا(
و
*3ط أ%+ا ,وى %د اف % 0د ا%-ة
/ا 5 67ل ا
٢
(1 2 3
456
7 8 9)
٣
Matrices
Example
Matrices
٧
Vectors
x= [1: 5]
y =[3: -1: 1]
x =[2: 2: 7]
Matrix operations
A+B
A+B+C
(A+B+C)-10
Matrix generators
Note: To tell MATLAB how big these matrices should be, you give the
functions the number of rows and columns.
To convert rows into columns we use the transpose symbol ‘
The command det(x) finds the determinant of a matrix
The command inv(x) finds the inverse of a matrix.
Row index and column index
You can pick out the first and the second elements in the vector ‘B’ by
using a vector as an index to ‘B’ Type: B([1 2]).
! ر
ا
م ا
A(row number, :)
د
ا
م ا# ! ر
A(:,column number )
١٤
Column symbol as an index