%The program eliminates from the interval matrix [m,M] the rows containing % (0,....,0) and the columns containing the transpose of (0,...,0) function A=reduce(m,M) [p,q]=size(m); % we construct the array v whose entries are the indices of the rows % containing (0,....,0) v=zeros(1,0); for i=1:p if sum(m(i,:).* M(i,:)<=0)==q %that is every entry of the i-th row contains 0 v=[v,i]; end end % we construct the array w whose entries are the indices of the columns % containing the transpose of (0,....,0) w=zeros(1,0); for j=1:q if sum(m(:,j).* M(:,j)<=0)==p %that is every entry of the j-th column contains 0 w=[w,j]; end end m1=m(setdiff([1:p],v), setdiff([1:q],w)) M1=M(setdiff([1:p],v), setdiff([1:q],w)) A=[m1,M1];