From: Misha Koshelev on
Update: on File Exchange

Latest version:
http://www.mathworks.com/matlabcentral/fileexchange/26432

Only Euclidean distance:
http://www.mathworks.com/matlabcentral/fileexchange/26431

Thank you!
Misha