Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
Optimizing code: various distance
조회 수: 2 (최근 30일)
이전 댓글 표시
Hi all,
Is there a way to improve the performance of the following code?
D=zeros(size(X,1),size(Y,1));
for l=1:size(X,1)
D(l,:)=sum((abs(bsxfun(@minus,Y,X(l,:))).^p),2).^(1/p);
end
Thank you in advance
댓글 수: 0
답변 (0개)
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!