1 function [W,distances] = compute_relation(data,scale_sig,order)
3 % [W,distances] = compute_relation(data,scale_sig)
4 % Input: data= Feature_dimension x Num_data
5 % ouput: W = pair-wise data similarity matrix
6 % Dist = pair-wise Euclidean distance
12 distances = zeros(length(data),length(data));
13 for j = 1:length(data),
14 distances(j,:) = (sqrt((data(1,:)-data(1,j)).^2 +...
15 (data(2,:)-data(2,j)).^2));
18 % distances = X2distances(data');
20 if (~exist('scale_sig')),
21 scale_sig = 0.05*max(distances(:));
28 tmp = (distances/scale_sig).^order;