Control Lab Exp 2

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

EXPERIMENT NO.

-2
OBJECTIVE: To determine

or perform all matrix


operations like addition, subtraction, multiplication,
division, inverse and transpose.

HARDWARE & SOFTWARE REQUIRED:


S.N
O.
1.
2.
3.
4.

Name of the apparatus


PC
MATLAB Software
Printer
Paper

Specifications
Any
2012 version or higher
Any
A4 size sheets

BRIEF THEORY:
In mathematics, a matrix (plural matrices) is
a rectangular array of numbers, symbols,
or expressions, arranged in rows andcolumns. The
individual items in a matrix are called
its elements or entries. Provided that they are the same
size (have the same number of rows and the same
number of columns), two matrices can be added or
subtracted element by element. The rule for matrix
multiplication, however, is that two matrices can be
multiplied only when the number of columns in the first
equals the number of rows in the second. Any matrix
can be multiplied element-wise by a scalar from its
associated field.

PROGRAM:
a=[1 2 0; 2 5 -1; 4 10 -1]

b=[1 2 4; 2 5 10; 0 -1 -1]


c=a+b
d=a-b
e=a*b
f=a/b
g=inv(a)
h=a'
j=det(a)

RESULT:

PRECAUTIONS:
1. Write the codes carefully.
2. Take values for input matrices which can be easily
calculated.

VIVA VOCE QUESTIONS:


1.What is a matrix?
ANS. It is a rectangular array of no.s arranged in row
or columns.
2.What is the condition of matrix
multiplication?

ANS. No. Of column of 1st matrix is equal must be


equal to the no. Of rows of 2nd matrix, only then
matrix multiplication is possible.

You might also like