SlideShare a Scribd company logo
function x=determinant(A)
[nrow,ncol]=size(A);
if(nrow==ncol)
if size(A)==[1 1]
x=A(1,1);
elseif size(A)==[2 2]
x=A(1,1)*A(2,2)-A(1,2)*A(2,1);
else
x=0;
for i=1:ncol
x=x+((-1)^(1+i)*A(1,i)*determinant(A(2:end,[1:i-1 i+1:end])));
end
end
else
disp('Error:Dimension Mismatch');
end
Ad

More Related Content

What's hot (20)

Packing density
Packing densityPacking density
Packing density
Gulfam Hussain
 
Damped system under Harmonic motion
Damped system under Harmonic motionDamped system under Harmonic motion
Damped system under Harmonic motion
Dhaval Chauhan
 
Gamma beta functions-1
Gamma   beta functions-1Gamma   beta functions-1
Gamma beta functions-1
Selvaraj John
 
Beam theory
Beam theoryBeam theory
Beam theory
bissla19
 
Statics
StaticsStatics
Statics
Ramasubbu .P
 
Sheet 1 pressure measurments
Sheet 1 pressure measurmentsSheet 1 pressure measurments
Sheet 1 pressure measurments
asomah
 
181_Sample-Chapter.pdf
181_Sample-Chapter.pdf181_Sample-Chapter.pdf
181_Sample-Chapter.pdf
ThanoonQasem
 
FEM Introduction: Solving ODE-BVP using the Galerkin's Method
FEM Introduction: Solving ODE-BVP using the Galerkin's MethodFEM Introduction: Solving ODE-BVP using the Galerkin's Method
FEM Introduction: Solving ODE-BVP using the Galerkin's Method
Suddhasheel GHOSH, PhD
 
centroid
centroidcentroid
centroid
Prof. S.Rajendiran
 
Laplace transform
Laplace  transform   Laplace  transform
Laplace transform
001Abhishek1
 
Laplace table
Laplace tableLaplace table
Laplace table
Alelign Hailu
 
Finite Element Analysis of Truss Structures
Finite Element Analysis of Truss StructuresFinite Element Analysis of Truss Structures
Finite Element Analysis of Truss Structures
Mahdi Damghani
 
Signals and Systems Formula Sheet
Signals and Systems Formula SheetSignals and Systems Formula Sheet
Signals and Systems Formula Sheet
Haris Hassan
 
Engineering Mathematics 2 questions & answers
Engineering Mathematics 2 questions & answersEngineering Mathematics 2 questions & answers
Engineering Mathematics 2 questions & answers
Mzr Zia
 
Composite Material With Ansys
Composite Material With AnsysComposite Material With Ansys
Composite Material With Ansys
Jafar Hasanpoor
 
Finite Element Analysis - UNIT-3
Finite Element Analysis - UNIT-3Finite Element Analysis - UNIT-3
Finite Element Analysis - UNIT-3
propaul
 
15Tarique_DSP_8ETC.PPT
15Tarique_DSP_8ETC.PPT15Tarique_DSP_8ETC.PPT
15Tarique_DSP_8ETC.PPT
SadorYonas
 
B.tech ii unit-5 material vector integration
B.tech ii unit-5 material vector integrationB.tech ii unit-5 material vector integration
B.tech ii unit-5 material vector integration
Rai University
 
Overhanged Beam and Cantilever beam problems
Overhanged Beam and Cantilever beam problemsOverhanged Beam and Cantilever beam problems
Overhanged Beam and Cantilever beam problems
sushma chinta
 
Shi20396 ch13
Shi20396 ch13Shi20396 ch13
Shi20396 ch13
Paralafakyou Mens
 
Damped system under Harmonic motion
Damped system under Harmonic motionDamped system under Harmonic motion
Damped system under Harmonic motion
Dhaval Chauhan
 
Gamma beta functions-1
Gamma   beta functions-1Gamma   beta functions-1
Gamma beta functions-1
Selvaraj John
 
Beam theory
Beam theoryBeam theory
Beam theory
bissla19
 
Sheet 1 pressure measurments
Sheet 1 pressure measurmentsSheet 1 pressure measurments
Sheet 1 pressure measurments
asomah
 
181_Sample-Chapter.pdf
181_Sample-Chapter.pdf181_Sample-Chapter.pdf
181_Sample-Chapter.pdf
ThanoonQasem
 
FEM Introduction: Solving ODE-BVP using the Galerkin's Method
FEM Introduction: Solving ODE-BVP using the Galerkin's MethodFEM Introduction: Solving ODE-BVP using the Galerkin's Method
FEM Introduction: Solving ODE-BVP using the Galerkin's Method
Suddhasheel GHOSH, PhD
 
Laplace transform
Laplace  transform   Laplace  transform
Laplace transform
001Abhishek1
 
Finite Element Analysis of Truss Structures
Finite Element Analysis of Truss StructuresFinite Element Analysis of Truss Structures
Finite Element Analysis of Truss Structures
Mahdi Damghani
 
Signals and Systems Formula Sheet
Signals and Systems Formula SheetSignals and Systems Formula Sheet
Signals and Systems Formula Sheet
Haris Hassan
 
Engineering Mathematics 2 questions & answers
Engineering Mathematics 2 questions & answersEngineering Mathematics 2 questions & answers
Engineering Mathematics 2 questions & answers
Mzr Zia
 
Composite Material With Ansys
Composite Material With AnsysComposite Material With Ansys
Composite Material With Ansys
Jafar Hasanpoor
 
Finite Element Analysis - UNIT-3
Finite Element Analysis - UNIT-3Finite Element Analysis - UNIT-3
Finite Element Analysis - UNIT-3
propaul
 
15Tarique_DSP_8ETC.PPT
15Tarique_DSP_8ETC.PPT15Tarique_DSP_8ETC.PPT
15Tarique_DSP_8ETC.PPT
SadorYonas
 
B.tech ii unit-5 material vector integration
B.tech ii unit-5 material vector integrationB.tech ii unit-5 material vector integration
B.tech ii unit-5 material vector integration
Rai University
 
Overhanged Beam and Cantilever beam problems
Overhanged Beam and Cantilever beam problemsOverhanged Beam and Cantilever beam problems
Overhanged Beam and Cantilever beam problems
sushma chinta
 

More from Sonia Pahuja (14)

numerical method solutions
numerical method solutionsnumerical method solutions
numerical method solutions
Sonia Pahuja
 
Bisection method solved questions
Bisection method solved questionsBisection method solved questions
Bisection method solved questions
Sonia Pahuja
 
raster and random scan
raster and random scanraster and random scan
raster and random scan
Sonia Pahuja
 
Scanfill polygon
Scanfill polygonScanfill polygon
Scanfill polygon
Sonia Pahuja
 
Graphics exercise (b.tech)
Graphics exercise (b.tech)Graphics exercise (b.tech)
Graphics exercise (b.tech)
Sonia Pahuja
 
graphics notes
graphics notesgraphics notes
graphics notes
Sonia Pahuja
 
Graphics exercise (b.tech)
Graphics exercise (b.tech)Graphics exercise (b.tech)
Graphics exercise (b.tech)
Sonia Pahuja
 
Surajkund Mella Faridabad
Surajkund Mella FaridabadSurajkund Mella Faridabad
Surajkund Mella Faridabad
Sonia Pahuja
 
Business Ethics
Business Ethics Business Ethics
Business Ethics
Sonia Pahuja
 
Gaussel Method
Gaussel MethodGaussel Method
Gaussel Method
Sonia Pahuja
 
CODE Data Structures
CODE Data StructuresCODE Data Structures
CODE Data Structures
Sonia Pahuja
 
DATABASE MANAGEMENT SYSTEM
DATABASE MANAGEMENT SYSTEMDATABASE MANAGEMENT SYSTEM
DATABASE MANAGEMENT SYSTEM
Sonia Pahuja
 
Introduction to sets
Introduction to setsIntroduction to sets
Introduction to sets
Sonia Pahuja
 
Data Link Control
Data Link ControlData Link Control
Data Link Control
Sonia Pahuja
 
numerical method solutions
numerical method solutionsnumerical method solutions
numerical method solutions
Sonia Pahuja
 
Bisection method solved questions
Bisection method solved questionsBisection method solved questions
Bisection method solved questions
Sonia Pahuja
 
raster and random scan
raster and random scanraster and random scan
raster and random scan
Sonia Pahuja
 
Graphics exercise (b.tech)
Graphics exercise (b.tech)Graphics exercise (b.tech)
Graphics exercise (b.tech)
Sonia Pahuja
 
Graphics exercise (b.tech)
Graphics exercise (b.tech)Graphics exercise (b.tech)
Graphics exercise (b.tech)
Sonia Pahuja
 
Surajkund Mella Faridabad
Surajkund Mella FaridabadSurajkund Mella Faridabad
Surajkund Mella Faridabad
Sonia Pahuja
 
CODE Data Structures
CODE Data StructuresCODE Data Structures
CODE Data Structures
Sonia Pahuja
 
DATABASE MANAGEMENT SYSTEM
DATABASE MANAGEMENT SYSTEMDATABASE MANAGEMENT SYSTEM
DATABASE MANAGEMENT SYSTEM
Sonia Pahuja
 
Introduction to sets
Introduction to setsIntroduction to sets
Introduction to sets
Sonia Pahuja
 
Ad

Determinant Matlab Code

  翻译: