function [inb,otb] = passing(inb,otb,e,l) % % returns updated basis with variables passing % % on entry: % inb indices to variables in the basis; % otb indices to variables outside the basis; % e variable entering the basis; % l variable leaving the basis. % % on return: % inb indices to variables in the basis; % otb indices to variables outside the basis. % n = length(otb); for i=1:n if (otb(i) == e) otb(i) = inb(l); break; end; end; inb(l) = e;