 Here is an example with an anonymous function:
</p>

<pre class="matlab">
Exp.Ordering = @(beta,gamma) gaussian(beta,0,15/180*pi);
</pre>

<p>
If the function cannot be written as a singe line, define a separate function and provide it via its function handle. For example, here is a function <code>oridist</code> defining a von Mises-Fisher distribution
</p>
   
<pre class="matlab">
function P = oridist(beta,gamma)
gamma0 = 0;
beta0 = pi/4;
kappa = 10;
mu = ang2vec(gamma0,beta0);
x = ang2vec(gamma(:),beta(: