Info
この質問は閉じられています。 編集または回答するには再度開いてください。
Possibility to vectorize this code?
1 回表示 (過去 30 日間)
古いコメントを表示
Hello,
I am trying to find a way to vectorize this code, but because of the +1 indices I can't get it done. Is there any possibility? Thank you very much for your help!
d = toeplitz(find(s1),find(s2))-1;
for j = 1:numel(s2)-1
for i = 1:numel(s1)-1
d(i+1,j+1) = min(min(d(i,j+1),d(i+1,j)) + 1,d(i,j) + ne(s1(i), s2(j)));
end
end
1 件のコメント
Matt Fig
2012 年 10 月 15 日
It would help if we had some code that we could actually run. Like give sample data for s1, s2, ne that is representative of the real data in size and class...
回答 (1 件)
この質問は閉じられています。
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!