Is there a way to reduce the computation time in this program that eliminates the columns of a matrix A if for a given column the element of line 4 is equal to the element in row 5:
k=1;
for i=1:4000
if A(4,i) ~= A(5,i)
B(:,k)=A(:,i);
k=k+1;
end
end