Académique Documents
Professionnel Documents
Culture Documents
Title: Write a programme that receives input from user and calculates the determinant of the
input.
MATLAB
Flow chart
Start
Input Matrix, a
If square matrix
m=n
m=no. of row
n= no. of column
TRUE
Set det=1
det= determinant
for j=1:n
Value of determinant
det=det*a(j,j)
FALSE
Output
No Determinant of Matrix a
for j = 1:n-1
j = column of matrix
for i = j+1:n
i = row of matrix
f= a(i,j)/a(j,j)
f = factor
To get new matrix a
a(i,j:n)=a(i,j:n)-f*a(j,j:n)
Output
Determinant of Matrix a
End