First off, if you look inside kmeans.m you should find an implementation of this.
I'm hoping this is the kind of information you want, based on your other comments. Pick a point at random as the first cluster center. The general idea is that you want other cluster centers to be far from the first one. Suppose the D^2 distances from the other points to the first center are in descending order 12, 10, 2, 1.1, 0.5, ..., and suppose the sum of these is 30. Then you would choose as the second cluster the first point with probability 12/30, the second with probability 10/30, and so on.
For the third center, proceed the same way but D^2 for any point is the minimum distance from that point to the first two centers. Then choose centers 4,5,...,k the same way,
Generally this just starts you out. You proceed with the k-means algorithm iterations once you select the k starting centers.