[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #50377] pdist2 function returns complex result
From: |
Georg Wiora |
Subject: |
[Octave-bug-tracker] [bug #50377] pdist2 function returns complex results |
Date: |
Wed, 1 Mar 2017 10:13:13 -0500 (EST) |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0 |
Follow-up Comment #3, bug #50377 (project octave):
I reviewed your "max()" suggestion and now aggree that this is the better
solution. The code segement below should the be changed to the following
code:
function dists = distEucSq (x, y)
xx = sumsq (x, 2);
yy = sumsq (y, 2)';
dists = max(0, bsxfun (@plus, xx, yy) - 2 * x * (y'));
endfunction
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?50377>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Octave-bug-tracker] [bug #50377] pdist2 function returns complex results,
Georg Wiora <=