20 lines
446 B
Mathematica
20 lines
446 B
Mathematica
function Valid = checkIV(M)
|
|
LiCols = licols(M);
|
|
n=[]; %count how many times the Linear Independent Column is present in M
|
|
Valid = 0; %booleqn representing zhether or not a Linear Independent Column is present only once
|
|
for i=1:columns(LiCols)
|
|
n(i)=0;
|
|
for j=1:columns(M)
|
|
if M(j)==LiCols(i)
|
|
n(i)++;
|
|
endif
|
|
endfor
|
|
endfor
|
|
|
|
for z=1:columns(n)
|
|
if n(i)==1
|
|
Valid = 1;
|
|
endif
|
|
endfor
|
|
endfunction
|