フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Optimizing code: various distance

1 回表示 (過去 30 日間)
nedo nodo
nedo nodo 2013 年 1 月 22 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
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 件)

この質問は閉じられています。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by