Is it possible to answer this question? It depends on "your own codes". Do you mean: "I want to create a kmeans clustering function - where can I find corresponding literature?"
There are several kmeans++ implementations in the FEX. Did you check them? And asking Google for "Matlab kmeans" would be a good idea also.