lOMoARcPSD|431 676 9
LAB REPORT
4.1 Constructing a row matrix:
To create a matrix that has multiple rows, separate the numbers with space or with comma
4.2 Constructing a column matrix:
For constructing a column matrix, we must separate numbers with a semi-colon “;”
4.3 Constructing an Identity Matrix
It is a type of matrix where the diagonal elements of a matrix is 1 and the rest
is 0.
1
lOMoARcPSD|431 676 9
4.4 Constructing a Null Matrix
Null Matrix is a matrix having all of its elements 0. It is also called zero
matrix.
2
lOMoARcPSD|431 676 9
4.5 Constructing a Square Matrix
A square matrix is a type of matrix whose numbers of elements
present in rows and columns are equal. It is demonstrated as:
4.6 Constructing a rectangular matrix
A matrix formed by different numbers of rows and columns is known as
2 4
a rectangular matrix. For example; A=6 8
1 3
3
lOMoARcPSD|431 676 9
4.7 Sum of matrices:
To find the sum of matrices, first of all, store the matrix in a variable;
suppose “A” and store the other matrix in another variable; suppose “B”. Now write A+B
where A is the first matrix and B is the second matrix.
4.8 Product of matrices:
To find the product of two matrices, the number of columns of the 1st matrix must equal the
number of rows of the 2nd matrix. And the result will have the same number of rows as the
1st matrix, and the same number of columns as the 2nd matrix.
4
lOMoARcPSD|431 676 9
4.9 Determinant of a matrix
Determinant of a matrix is calculated using the det function of MATLAB.
Determinant of a matrix A is given by det(A).
ANS:
4.10 Transpose of a Matrix:
The transpose operation switches the rows and columns in a matrix. It is
represented by a single quote(').
5
lOMoARcPSD|431 676 9
4.11 Inverse of a Matrix:
Inverse of Matrix for a matrix A is denoted by A-1. Inverse of a matrix in MATLAB is
calculated using the inv function. Inverse of a matrix A is given by inv(A).
4.12 Adjoint of a Matrix:
Using MATLAB, the adjoint of a Matrix can be calculated as done below:
6
lOMoARcPSD|431 676 9
4.13 Verify AA-1=I and A-1 A = I.
4.14 Plot the tan360*4.
7
lOMoARcPSD|431 676 9
8
lOMoARcPSD|431 676 9
4.15 Plot the function y=x3 where x€(-5,5).
4.16 Plot the function y=x2-5x+6 where x belongs to (-5,10).
9
lOMoARcPSD|431 676 9
4.17 Create MATLAB Code for circle x2 + y2 = 25
𝑥2 𝑦2
4.18 Create MATLAB Code for hyperbola − =1
16 9
10
lOMoARcPSD|431 676 9
4.19 Plot sin180° in MATLAB
4.20 Plot cos360° in MATLAB.
4.21 Plot the vectors [1 0] and [2 2] with the ‘compass’ function.
11
lOMoARcPSD|431 676 9
4.23. Show the system of Linear equations having 2 variables.
12
lOMoARcPSD|431 676 9
4.24 Find the scalar(dot) product of two vectors.
4.25 Finding the Vector(cross) product.
4.26 Plot a Linear Function.
13
lOMoARcPSD|431 676 9
4.27 Plot a quadratic function.
4.28 Find Scalar and dot triple product of 3 vectors.
4.29 Find the vector triple product of 3 vectors.
14
lOMoARcPSD|431 676 9
4.30 Find the first 5 odd numbers and calculate its sum.
4.31 Find the 7th term of the series “2,5,8,…..”.
15
lOMoARcPSD|431 676 9
4.32 Find the sixth term and sum of the first six terms of the arithmetic
sequence 3,7,11,15…. where a = 3 and d = 4.
4.33 Find the 7th term and sum of the first seven terms of the Geometric
Sequence.
16
lOMoARcPSD|431 676 9
4.34 Solve x2-5x+6=0
4.35 Solve x3-7x2-36=0
17