Can recognize what distance is this ?
1 次查看(过去 30 天)
显示 更早的评论
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/412788/image.png)
Can anyone explain me what does this code do,
Could it be the after first if is calculated euclodean distance and in else there is second distance called mahalanobis distance ?
0 个评论
采纳的回答
Walter Roberson
2020-11-13
The clue is in the name of the variable: useL1Distance . If it is true, then the L1 norm is used, which is also called "taxi-cab distance".
If it is false, then the L2 norm is used, which is also called Euclidean distance.
Neither branch has anything to do with maholonobis distance.
4 个评论
更多回答(1 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!