From de117f704b4eb1640d8370d50e38709521c5e1c5 Mon Sep 17 00:00:00 2001 From: Norbert Marwan Date: Mon, 28 Feb 2022 17:28:52 +0100 Subject: [PATCH] change from pdist to pdist2 --- rp.m | 4 ++-- rp_iso.m | 2 +- rp_perp.m | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rp.m b/rp.m index 1e2a2be..7fae0d5 100644 --- a/rp.m +++ b/rp.m @@ -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 diff --git a/rp_iso.m b/rp_iso.m index e708706..c065325 100644 --- a/rp_iso.m +++ b/rp_iso.m @@ -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; diff --git a/rp_perp.m b/rp_perp.m index 350b214..fd39c08 100644 --- a/rp_perp.m +++ b/rp_perp.m @@ -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;