简体   繁体   English

如何在matlab中计算两个向量之间的距离

[英]how to calculate the distance between two vectors in matlab

can you help me, I have 480(rows)*256(columns) which extracted by LBP operator.so i need to get the similarity matrices to apply the verification scenario. 您能帮我吗,我有480(行)* 256(列),是由LBP运算符提取的。因此,我需要获取相似度矩阵才能应用验证场景。 eg vector one with itself will give zero and vector one with vector two will give score and so on why I am doing this, is because I need to calculate false accept rate and false reject rate (FAR,FRR) by threshold. 例如,向量1本身将给出0,向量1以及向量2将给出得分,依此类推,为什么这样做,是因为我需要通过阈值计算错误接受率和错误拒绝率(FAR,FRR)。
thanks in advance 提前致谢

Use the pdist function. 使用pdist函数。 Note that it considers rows as instances (so you might want to transpose the matrix if you want to apply it to column vectors). 请注意,它将行视为实例(因此,如果要将矩阵应用于列向量,则可能需要转置矩阵)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM