Commit 2ab7ed0c authored by Andrew Cohen's avatar Andrew Cohen
Browse files

check for NaN on distances, make it Inf

parent b30f0a16
......@@ -55,10 +55,12 @@ for i=1:length(words)
d1(i)=(NWD1x(i)-NWD1(i));
d2(i)=(NWD2x(i)-NWD2(i));
if isnan(d1(i)) % f(X)=0 --> -log2(0)==Inf , Inf-Inf=NaN
d1(i)=Inf;
end
if isnan(d2(i)) % f(X)=0 --> -log2(0)==Inf
d2(i)=Inf;
end
if d1(i)<d2(i)
% if abs(d1(i))<abs(d2(i)) % magnitude?
fprintf('1,');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment