eful if D is a distance matrix,
 generated by the likes of pdist2.

 Note that as sigma-&gt;0, softMin's behavior tends toward that of the
 standard min function.  That is the softMin of a vector D has all zeros
 with a single 1 in the location of the smallest value of D. For example,
 &quot;softMin([.2 .4 .1 .3],eps)&quot; returns &quot;[0 0 1 0]&quot;.  As sigma-&gt;inf, then
 softMin(D,sigma) tends toward &quot;ones(1,n)/n&quot;, where n==length(D).

 If D contains the squared euclidean distance between 