Skip to content

Commit

Permalink
change from pdist to pdist2
Browse files Browse the repository at this point in the history
  • Loading branch information
pucicu committed Feb 28, 2022
1 parent 1da3964 commit de117f7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions rp.m
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,10 @@
switch meth
case 'euc'
% euclidean distance between two phase space vectors
d = squareform(pdist(x));
d = pdist2(x,x);
otherwise
% max-norm distance between two phase space vectors
d = squareform(pdist(x,'chebychev'));
d = pdist2(x,x,'chebychev');
end
end

Expand Down
2 changes: 1 addition & 1 deletion rp_iso.m
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@

%% calculate distance matrix D and RP
% distance matrix using MATLAB's pdist function
d = squareform(pdist(x));
d = pdist2(x,x);

% apply threshold and get the RP
r = d < e;
Expand Down
2 changes: 1 addition & 1 deletion rp_perp.m
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@

%% calculate distance matrix D and RP
% distance matrix using MATLAB's pdist function
d = squareform(pdist(x));
d = pdist2(x,x);

% apply threshold and get the RP
r = d < e;
Expand Down

0 comments on commit de117f7

Please sign in to comment.