function [possible_prob_best_selection,mi,mv] = eval_prob_best_selection(n) % % Written by: % -- % John L. Weatherwax 2006-12-31 % % email: wax@alum.mit.edu % % Please send comments and especially bug reports to the % above email address. % %----- possible_prob_best_selection = []; for m=1:(n-1) v = eval_prob_best_selection_at_m(n,m); possible_prob_best_selection = [ possible_prob_best_selection, v ]; end [mv,mi] = max( possible_prob_best_selection ); % mi index is between 1-(n-1)