Which is the best optimization method for optimizing over probability mass functions?

I have a nonlinear scalar function f of a n-dimensional variable/vector p, where p is a probability mass function (PMF) for a (discrete) random variable with finite support. This means that the entries of the vector p are probabilities that sum to one, so and for .

What's the best MATLAB optimization method for finding the minimum of f? I have been using fmincon,but I thought perhaps there's a better method.

Here's my code for a random toy nonliner function f (which is the function funOpt in the code):

%Optimization problem for a probability mass function (PMF)

numbPMF=3; %number probability mass function (PMF) values

rng(1); %set random seed for reproducibility

p0=rand(1,numbPMF);p0=p0/sum(p0); %create a random PMF

funOpt=@(p)(sum((p-p0).^2+(p-p0).^3)); %example of a nonlinear function