% The program says whether a square interval matrix [m,M] pxp has Mrk=p % it uses Theorem 13 of the paper On rank range of interval matrices % and the program nondegpgdiag, which, given k,m,M, calculates % the totally nongenerate pg daigonal of length k %If the result is 1, then Mrk(m,M)=p; if the result is 0, then Mrk(m,M)

0 %in this case condition (1) of theorem does not hold a=1; return end for k=1:p-1 U=nondegpgdiag(k,m,M) for i=1:size(U,1) if det(A(setdiff([1:p],U(i,1:k)),setdiff([1:p],U(i,k+1:2*k))))~=0 % if this holds conditon (2) of the theorem does not hold a=1; return end end end