?? 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 + -