Basics of Matrices
Row Matrix :
row matrix:
a matrix which has only one row.
example: [1 2 3]
column Matrix :
a matrix which has only one column
example [ 1
2
3 ]
square matrix:
has equal number of rows and columns
ex: a=[ 2 2
4 4 ]
this a 2 x 2 matrix rectangular matrix: matrix which has unequal columns and rows
ex: a = [2 2 2
4 4 4 ]
coding for initializing the each of the above matrices:
row matrix initializing
row matrix:
a matrix which has only one row.
example: [1 2 3]
column Matrix :
a matrix which has only one column
example [ 1
2
3 ]
square matrix:
has equal number of rows and columns
ex: a=[ 2 2
4 4 ]
this a 2 x 2 matrix rectangular matrix: matrix which has unequal columns and rows
ex: a = [2 2 2
4 4 4 ]
coding for initializing the each of the above matrices:
row matrix initializing
a = [1 2 3] (this initilizes a row matrix)column matrix initializing:
b = [1 ; 2 ; 3] (';' is used to end a particular row)square matrix initializing:
c = [2 2 ; 4 4]rectangular matrix initializing:
d = [2 2 2 ; 4 4 4]the output is
No comments:
Post a Comment