[英]Max Euclidean distance between two columns of a matrix in Matlab / Octave
I need to calculate for a program the maximal euclidian distance of vectors that are put together in a matrix A
in Octave. 我需要为程序计算在八度音阶中的矩阵A
中放在一起的向量的最大欧式距离。
What I have so far: 到目前为止,我有:
for i=1:n
for k=i:n+1
C=A(:,i)-A(:,k);
maxdiff=max(norm(C),maxdiff);
endfor
endfor
This is not working and I don't know why. 这不起作用,我也不知道为什么。 Any help is appreciated! 任何帮助表示赞赏!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.