mirror of
https://github.com/kuhyx/WUT_Computer_Science.git
synced 2026-07-04 16:23:11 +02:00
20 lines
375 B
Matlab
20 lines
375 B
Matlab
function [out] = columnDominant(A)
|
|
%COLUMNDOMINANT checks column dominance of matrix A
|
|
% returns true when dominant, false otherwise
|
|
n = size(A);
|
|
|
|
for j = 1:1:n
|
|
sum = 0;
|
|
for i = 1:1:n
|
|
if i == j
|
|
continue
|
|
end
|
|
sum = sum + abs(A(i,j));
|
|
end
|
|
if abs(A(j,j)) <= sum
|
|
out = false;
|
|
return
|
|
end
|
|
end
|
|
out = true;
|
|
end |