Fergusson College,Pune-05
F.Y.B.Sc.(C.S.)
Mathematics Practical
Scilab Assignment -01
Q1.
I) Enter the following matrices
A= [ 1 2 3 4 ]
4
B= e
7ᴨ
2 4 5
C = 1 2 −3
3 0 1
2 2i 3+ 4 i
D = 1 2 /3 4
3 4 5
E=1 2 3
1 3 4
Using Scilab commands display the following
1) (1,2 ) element of matrix A
2) (3,1 ) element of matrix B
3) (3,3 ) element of matrix C
4) Third Column of matrix A
5) Second row of matrix C
6) Diagonal of matrix E
7) Dimension of matrix D
8) Trace of matrix C
Using scilab commands compute each of the following(if possible)
1) C + E
2) At
3) D x E
4) 3 x B
5) Ct -E
Q2 .Generate each of the following matrices:
1.Random matrix of order 4 x 4, with integer entries.Find its trace also.
2. Random matrix of order 3 x 5 with all real entries
3. Zero matrix of order 2 x5.
4. Identity matrix of order 3 x3
5. Matrix of order 3x4 containing all entries equal to 1.
Q3. Display each of the following diagonal matrices.
1. The 4x4 diagonal matrix with main diagonal [1 2 3 4 ].
2. The 5x5 diagonal matrix with main diagonal [0 1 ½ 1/3 1/4].
3. The 5x5 scalar matrix with all 5’s on the diagonal
4. The 5x5 identity matrix.
Q4.
a) Accept the matrices A= 2 -1 4 3 and B= -1 4 3 2
0 0 1 2 2 1 -1 1
3 2 1 1 5 5 1 4
0 3 -1 4 3 3 0 4
1) Find det(A),det(B) Verify that det(AB)= det(A).det(B).
2) find inverse of A and B
3) Find reduced row echelon form of A and B
2 5 5 1 5
[ ]
b) Declare the matrix A = 4 2 0
1 2 3
and B= 2 −5
6 0
Find the augmented matrix [A B] and find rank of [A B]
Q5. Solve the following Systems of linear equations by using linsolve command
a) 3x+2y- z = -15
5x+3y+2z = 0
3x+y+3z = 11
-6x-4y+2z = 30
b) 2 x-3y+4z –w = 0
7 x+y-8z +9w = 0
2 x+8y+z - w = 0
c) x-2y+z –4w = 1
x+3y+7z +2w = 2
x-12y-11z - 16w = 5