bonjour, j'ai écris un programme permettant de calculer le determinant d'une matrice 4*4, mais comme je n'ai pas Matlab je ne peux pas corriger, pouvez vous m'aidez.
fonction [det4]=deter4(M)
%UNTITLED2 Summary of this function goes here
% Detailed explanation goes here
x=[M(2,2),M(2,3),M(2,4);M(3,2),M( 3,3),M(3,4);M(4,2),M(4,3),M(4, 4)]
y=[M(2,1),M(2,3),M(2,4);M(3,1),M( 3,3),M(3,4);M(4,1),M(4,3),M(4, 4)]
z=[M(2,1),M(2,2),M(2,4);M(3,1),M( 3,2),M(3,4);M(4,1),M(4,2),M(4, 4)]
t=[M(2,1),M(2,2),M(2,3);M(3,1),M( 3,2),M(3,3);M(4,1),M(4,2),M(4, 3)]
det4=(M(1,1)*deter3(x))-(M(1,2)*deter3(y))+(M(1,3)*det er3(z))-(M(1,4)*deter3(t))
end
function [ det3 ] = deter3 ( M )
%UNTITLED2 Summary of this function goes here
% Detailed explanation goes here
a= [M(2,2), M(2,3); M(3,2),M(3,3)]
b=[ M(2,1), M(2,3); M(3,1), M(3,3)]
c=[ M(2,1), M(2,2); M(3,1),M(3,2)]
det3=(M(1,1)*deter2(a))-(M(1,2)*deter2(b))+(M(1,3)*det er2(c))
end
function [ det2] =deter2(M )
%UNTITLED3 Summary of this function goes here
% Detailed explanation goes here
det2=M(1,1)*M(2,2)-M(1,2)*M(2,1)
end
-----