Skip to content

Commit

Permalink
work with a single input argument also
Browse files Browse the repository at this point in the history
  • Loading branch information
quantombone committed Jan 27, 2012
1 parent 2ac5855 commit 5189fc5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions util/distSqr_fast.m
Expand Up @@ -20,6 +20,10 @@
% Based on dist2.m code,
% Copyright (c) Christopher M Bishop, Ian T Nabney (1996, 1997)

if ~exist('y','var')
y = x;
end

if ~exist('x2','var')
x2 = sum(x.^2,1)';
end
Expand Down

0 comments on commit 5189fc5

Please sign in to comment.