How to find the similarity matrix of datasets(cell) which contain three matrices inside cell. I want to generate similarity matrix for each separate matrix.
1 次查看(过去 30 天)
显示 更早的评论
k = 5;
for i = 1 : 3
distX = L2_distance_1(data{i},data{i});
[dim,num]=size(data{i});
[distX1, idx] = sort(distX,2);
end
A = zeros(num);
rr = zeros(num,1);
for j = 1:num
di = distX1(j,2:k+2);
rr(m,j) = 0.5*(k*di(k+1)-sum(di(1:k)));
id = idx(j,2:k+2);
A(j,id) = (di(k+1)-di)/(k*di(k+1)-sum(di(1:k))+eps);
end;
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Multidimensional Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!