
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
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
1 / 1
This page cannot be seen from the preview
Don't miss anything!

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