📄 euclideandistance.m
字号:
% Works to obtain the Euclidean Distance of the passed vector...
% ------------------------------------------------------------
% Executes on being called, with input vectors X and Y.
% ------------------------------------------------------------
function value = euclideanDistance(X, Y)
[r, c] = size(X); % The length of the vector...
e = [];
% Euclidean Distance = sqrt [ (x1-y1)^2 + (x2-y2)^2 + (x3-y3)^2 ...]
for i = 1:c
e(i) = (X(i)-Y(i))^2;
end
Euclid = sqrt(sum(e));
%Obtain energyLevel...
value = Euclid;
% Works to obtain the Euclidean Distance of the passed vector...
% ------------------------------------------------------------
% Executes on being called, with input vectors X and Y.
% ------------------------------------------------------------% Works to obtain the Euclidean Distance of the passed vector...
% ------------------------------------------------------------
% Executes on being called, with input vectors X and Y.
% ------------------------------------------------------------% Works to obtain the Euclidean Distance of the passed vector...
% ------------------------------------------------------------
% Executes on being called, with input vectors X and Y.
% ------------------------------------------------------------% Works to obtain the Euclidean Distance of the passed vector...
% ------------------------------------------------------------
% Executes on being called, with input vectors X and Y.
% ------------------------------------------------------------% Works to obtain the Euclidean Distance of the passed vector...
% ------------------------------------------------------------
% Executes on being called, with input vectors X and Y.
% ------------------------------------------------------------% Works to obtain the Euclidean Distance of the passed vector...
% ------------------------------------------------------------
% Executes on being called, with input vectors X and Y.
% ------------------------------------------------------------% Works to obtain the Euclidean Distance of the passed vector...
% ------------------------------------------------------------
% Executes on being called, with input vectors X and Y.
% ------------------------------------------------------------% Works to obtain the Euclidean Distance of the passed vector...
% ------------------------------------------------------------
% Executes on being called, with input vectors X and Y.
% ------------------------------------------------------------% Works to obtain the Euclidean Distance of the passed vector...
% ------------------------------------------------------------
% Executes on being called, with input vectors X and Y.
% ------------------------------------------------------------% Works to obtain the Euclidean Distance of the passed vector...
% ------------------------------------------------------------
% Executes on being called, with input vectors X and Y.
% ------------------------------------------------------------% Works to obtain the Euclidean Distance of the passed vector...
% ------------------------------------------------------------
% Executes on being called, with input vectors X and Y.
% ------------------------------------------------------------% Works to obtain the Euclidean Distance of the passed vector...
% ------------------------------------------------------------
% Executes on being called, with input vectors X and Y.
% ------------------------------------------------------------% Works to obtain the Euclidean Distance of the passed vector...
% ------------------------------------------------------------
% Executes on being called, with input vectors X and Y.
% ------------------------------------------------------------% Works to obtain the Euclidean Distance of the passed vector...
% ------------------------------------------------------------
% Executes on being called, with input vectors X and Y.
% ------------------------------------------------------------
% Works to obtain the Euclidean Distance of the passed vector...
% ------------------------------------------------------------
% Executes on being called, with input vectors X and Y.
% ------------------------------------------------------------% Works to obtain the Euclidean Distance of the passed vector...
% ------------------------------------------------------------
% Executes on being called, with input vectors X and Y.
% ------------------------------------------------------------% Works to obtain the Euclidean Distance of the passed vector...
% ------------------------------------------------------------
% Executes on being called, with input vectors X and Y.
% ------------------------------------------------------------% Works to obtain the Euclidean Distance of the passed vector...
% ------------------------------------------------------------
% Executes on being called, with input vectors X and Y.
% ------------------------------------------------------------% Works to obtain the Euclidean Distance of the passed vector...
% ------------------------------------------------------------
% Executes on being called, with input vectors X and Y.
% ------------------------------------------------------------% Works to obtain the Euclidean Distance of the passed vector...
% ------------------------------------------------------------
% Executes on being called, with input vectors X and Y.
% ------------------------------------------------------------% Works to obtain the Euclidean Distance of the passed vector...
% ------------------------------------------------------------
% Executes on being called, with input vectors X and Y.
% ------------------------------------------------------------% Works to obtain the Euclidean Distance of the passed vector...
% ------------------------------------------------------------
% Executes on being called, with input vectors X and Y.
% ------------------------------------------------------------% Works to obtain the Euclidean Distance of the passed vector...
% ------------------------------------------------------------
% Executes on being called, with input vectors X and Y.
% ------------------------------------------------------------% Works to obtain the Euclidean Distance of the passed vector...
% ------------------------------------------------------------
% Executes on being called, with input vectors X and Y.
% ------------------------------------------------------------% Works to obtain the Euclidean Distance of the passed vector...
% ------------------------------------------------------------
% Executes on being called, with input vectors X and Y.
% ------------------------------------------------------------% Works to obtain the Euclidean Distance of the passed vector...
% ------------------------------------------------------------
% Executes on being called, with input vectors X and Y.
% ------------------------------------------------------------% Works to obtain the Euclidean Distance of the passed vector...
% ------------------------------------------------------------
% Executes on being called, with input vectors X and Y.
% ------------------------------------------------------------% Works to obtain the Euclidean Distance of the passed vector...
% ------------------------------------------------------------
% Executes on being called, with input vectors X and Y.
% ------------------------------------------------------------% Works to obtain the Euclidean Distance of the passed vector...
% ------------------------------------------------------------
% Executes on being called, with input vectors X and Y.
% ------------------------------------------------------------% Works to obtain the Euclidean Distance of the passed vector...
% ------------------------------------------------------------
% Executes on being called, with input vectors X and Y.
% ------------------------------------------------------------% Works to obtain the Euclidean Distance of the passed vector...
% ------------------------------------------------------------
% Executes on being called, with input vectors X and Y.
% ------------------------------------------------------------% Works to obtain the Euclidean Distance of the passed vector...
% ------------------------------------------------------------
% Executes on being called, with input vectors X and Y.
% ------------------------------------------------------------% Works to obtain the Euclidean Distance of the passed vector...
% ------------------------------------------------------------
% Executes on being called, with input vectors X and Y.
% ------------------------------------------------------------% Works to obtain the Euclidean Distance of the passed vector...
% ------------------------------------------------------------
% Executes on being called, with input vectors X and Y.
% ------------------------------------------------------------% Works to obtain the Euclidean Distance of the passed vector...
% ------------------------------------------------------------
% Executes on being called, with input vectors X and Y.
% ------------------------------------------------------------% Works to obtain the Euclidean Distance of the passed vector...
% ------------------------------------------------------------
% Executes on being called, with input vectors X and Y.
% ------------------------------------------------------------% Works to obtain the Euclidean Distance of the passed vector...
% ------------------------------------------------------------
% Executes on being called, with input vectors X and Y.
% ------------------------------------------------------------% Works to obtain the Euclidean Distance of the passed vector...
% ------------------------------------------------------------
% Executes on being called, with input vectors X and Y.
% ------------------------------------------------------------% Works to obtain the Euclidean Distance of the passed vector...
% ------------------------------------------------------------
% Executes on being called, with input vectors X and Y.
% ------------------------------------------------------------% Works to obtain the Euclidean Distance of the passed vector...
% ------------------------------------------------------------
% Executes on being called, with input vectors X and Y.
% ------------------------------------------------------------% Works to obtain the Euclidean Distance of the passed vector...
% ------------------------------------------------------------
% Executes on being called, with input vectors X and Y.
% ------------------------------------------------------------% Works to obtain the Euclidean Distance of the passed vector...
% ------------------------------------------------------------
% Executes on being called, with input vectors X and Y.
% ------------------------------------------------------------% Works to obtain the Euclidean Distance of the passed vector...
% ------------------------------------------------------------
% Executes on being called, with input vectors X and Y.
% ------------------------------------------------------------% Works to obtain the Euclidean Distance of the passed vector...
% ------------------------------------------------------------
% Executes on being called, with input vectors X and Y.
% ------------------------------------------------------------% Works to obtain the Euclidean Distance of the passed vector...
% ------------------------------------------------------------
% Executes on being called, with input vectors X and Y.
% ------------------------------------------------------------% Works to obtain the Euclidean Distance of the passed vector...
% ------------------------------------------------------------
% Executes on being called, with input vectors X and Y.
% ------------------------------------------------------------% Works to obtain the Euclidean Distance of the passed vector...
% ------------------------------------------------------------
% Executes on being called, with input vectors X and Y.
% ------------------------------------------------------------% Works to obtain the Euclidean Distance of the passed vector...
% ------------------------------------------------------------
% Executes on being called, with input vectors X and Y.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -