EXPERIMENT - 1


AIM

To Demonstrate Basic matrix operations in MATLAB.

THEORY

MATLAB is an abbreviation for "matrix laboratory". While other programming languages mostly work with numbers one at a time, MATLAB is designed to operate primarily on whole matrices and arrays.

MATLAB allows you to process all of the values in a matrix using a single arithmetic operator or function.

MATLAB COMMANDS USED

* A' : Transpose of matrix A
* eye(n) : Gives a Idenetity Matrix of n X n order
* size(A) : size of matrix A

MATLAB CODE

%Basic matrix operations in Matlab
clc;
A=[1 2 3 ; 5 3 2 ; 6 9 0];
At=A';
I=eye(3);
display('The Matrix A is :')
display(A)
display(['Size of matrix A is ',num2str
(size(A)),' (Rows Columns)'])
display('The 3 X 3 Identity Matrix I is :')
display(I);
display('The Transpose of  Matrix A is :')
display(At);

RESULT

The Basic matrix operations have been demonstrated.