0% found this document useful (0 votes)
43 views

Exp-2 Basic Matrix

The document describes an experiment to perform basic matrix operations in MATLAB. It provides the objective, software used, numerical values for matrices a and b, syntax for operations, commands, results, and precautions. Matrix operations performed include addition, subtraction, multiplication, division, inverse, diagonal, and transpose.

Uploaded by

Swaroop Mallick
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views

Exp-2 Basic Matrix

The document describes an experiment to perform basic matrix operations in MATLAB. It provides the objective, software used, numerical values for matrices a and b, syntax for operations, commands, results, and precautions. Matrix operations performed include addition, subtraction, multiplication, division, inverse, diagonal, and transpose.

Uploaded by

Swaroop Mallick
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

UIT, ALLAHABAD DEPARTMENT OF ELECTRICAL ENGINEERING

EXPERIMENT NO-02

STUDY OF BASIC MATRIX OPERATION

1.1 Objective 1.2 Software Used 1.3 Numerical 1.4 Syntax 1.5 Command 1.6 Result 1.7 Precautions

1.1 OBJECTIVE: To perform mathematical operations with MATRIX.

1.2 SOFTWARE USED:

S.NO. SOFTWARE USED SPECIFICATION


1. MATLAB 7.9.0(R2009b)
2. MICRO SOFT OFFICE WORD 2007

1.3 NUMERICAL: Find Summation, Subtraction, Multiplication, Division, Inverse, Diagonal and Transpose of the
following.

[ ] [ ]
1 3 0 2 −1 2
a= 2 6 4 b= 5 1 −3
−1 0 2 −3 1 1

where a, b are two 3*3 matrix.

1.4 SYNTAX: For

Addition a+b
Subtraction a-b
Division a/b
Multiplication a*b
Inverse inv(a),inv(b)
Diagonal diag(a),diag(b)
Transpose (a)’,(b)’

1.5 COMMAND:

>> a= [1 3 0;2 6 4;-1 0 2];


>> b= [2 -1 2;5 1 -3;-3 1 1];
>>SUM= a+b
>> SUB= a-b
>> DIV= a/b
>> MULTI= a*b
>> INV of a = inv(a)
>> INV of b = inv(b)
>> DIAG of a = diag(a)
>> DIAG of b = diag(b)
>> TRANS of a= (a)'

Exp-2 (NEE-353) Page 7


UCEM, ALLAHABAD DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGINEERING

>> TRANS of b= (b)'


1.6 RESULT:

[ ]
3 2 2
SUM = 7 7 1
−4 1 3

[ ]
−1 4 −2
SUB = −3 5 7
2 −1 1

[ ]
17 2 −7
MULTI = 22 8 −10
−8 3 0

[ ]
0.8000 1.3500 2.4500
DIV = 3.2000 2.9000 6.3000
0.6000 −0.0500 0.6500

[ ]
−1.0000 0.5000 −1.0000
INV of a= 0.6667 −0.1667 0.3333
−0.5000 0.2500 0

[ ]
0.2000 0.1500 0.0500
INV of b = 0.2000 0.4000 0.8000
0.4000 0.0500 0.3500

[]
1
DIAG of a = 6
2

[]
2
DIAG of b = 1
1

[ ]
1 2 −1
TRANS of a= 3 6 0
0 4 2

Exp-2 (NEE-353) Page 8


UCEM, ALLAHABAD DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGINEERING

[ ]
2 5 −3
TRANS of b= −1 1 1
2 −3 1

1.7 PRECAUTION:

 Command should be written correctly.


 Appropriate syntax should be used.

Exp-2 (NEE-353) Page 8

You might also like