Daniel@0: function [indices, pot] = find_most_prob_entry(pot) Daniel@0: % function [indices, pot] = find_most_prob_entry(pot) Daniel@0: % function [indices, pot] = find_most_prob_entry(pot) Daniel@0: % Find the indices of the argmax, and set all other enties to 0. Daniel@0: Daniel@0: %indices = argmax(pot.T); Daniel@0: [m i] = max(pot.T(:)); Daniel@0: indices = ind2subv(pot.sizes, i); Daniel@0: pot.T = 0*myones(pot.sizes); Daniel@0: pot.T(i) = m;