function e = entering(t,otb) % % returns the variable not in the basis which will enter. % % on entry: % t linear programming problem in standard format; % otb variables outside the basis. % % on return: % e column in t, corresponding to entering variable. % n = length(otb); e = 0; max = 0; for i=1:n if t(1,otb(i)) > max e = otb(i); max = t(1,e); end; end;