Matrix Inversion: Checking Symmetry and Singularity, Exercises of Signals and Systems Theory

This matlab script checks the symmetry and singularity of a given matrix to determine if it can be inverted. The script uses the 'det' function to find the determinant of the matrix and the 'inv' function to find the inverse. If the determinant is not zero and the matrix is symmetric, the inverse is calculated and displayed.

Typology: Exercises

2011/2012

Uploaded on 07/14/2012

kapor
kapor 🇮🇳

4

(1)

37 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
clear
clc
b=0;
%%%%%%uncomment your choice from below%%%%%
% a=[3 7 6;7 8 9;6 9 0]; %%% Non-singular Symmetric Matrix
% a=[1 2;3 4]; %%% non symmetric only
% a=[1 2;1 2]; %%% Non singular only
if det(a)~=0
if a==a'
b=inv(a);
else
disp('Your matrix is not symmetric ')
end
else
disp('Your Matrix is Singular Matrix ')
end
b
docsity.com

Partial preview of the text

Download Matrix Inversion: Checking Symmetry and Singularity and more Exercises Signals and Systems Theory in PDF only on Docsity!

clear clc b=0; %%%%%%uncomment your choice from below%%%%% % a=[3 7 6;7 8 9;6 9 0]; %%% Non-singular Symmetric Matrix % a=[1 2;3 4]; %%% non symmetric only % a=[1 2;1 2]; %%% Non singular only if det(a)~= if a==a' b=inv(a); else disp('Your matrix is not symmetric ') end else disp('Your Matrix is Singular Matrix ') end b

docsity.com