You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
436 B
13 lines
436 B
%--------------------------
|
|
% @Author: Jingqiao Hu
|
|
% @Date: 2021-05-18 20:52:12
|
|
% @LastEditTime: 2021-05-18 20:52:13
|
|
%--------------------------
|
|
% compute the determinat of 3-rank matrix M
|
|
function d = det_3rank(M)
|
|
a1 = M(1,:); b1 = M(4,:); c1 = M(7,:);
|
|
a2 = M(2,:); b2 = M(5,:); c2 = M(8,:);
|
|
a3 = M(3,:); b3 = M(6,:); c3 = M(9,:);
|
|
|
|
d = a1.*b2.*c3 + b1.*c2.*a3 + c1.*a2.*b3 - a3.*b2.*c1 - b3.*c2.*a1 - c3.*a2.*b1;
|
|
end
|