The following Matlab project contains the source code and Matlab examples used for kld sampling for particle filters using kullback leibler distance.
When using particle filters to approximate an unknown distribution, how many samples should be used? Too few may not adequately sample the distribution, while too many can unacceptably increase the run-time.