pdist custom distance function.

7 次查看(过去 30 天)
I have to use this distance in the pdist function:
norm((log(cov_1) - log(cov_2)),'fro')
I have already read the pdist documentation but I have not figured out how to define and call my distance in pdist.
someone could help, maybe with an example.

采纳的回答

Walter Roberson
Walter Roberson 2017-3-5
distfun = @(cov_1, cov_2) norm((log(cov_1) - log(cov_2)),'fro');
pdist(YourData, distfun)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Statistics and Machine Learning Toolbox 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by