From 3ab6dc90ba103b7a367c379ab4a63f0e113f0377 Mon Sep 17 00:00:00 2001 From: Glenn Thompson Date: Sat, 9 Jul 2016 13:42:48 +0100 Subject: [PATCH] Fixes to correlation toolkit suggested by Kyle Brill - see issue 51 --- core/@correlation/private/dendrogramplot.m | 4 +++- core/@correlation/stack.m | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/core/@correlation/private/dendrogramplot.m b/core/@correlation/private/dendrogramplot.m index 0af9ec6..4fe9841 100644 --- a/core/@correlation/private/dendrogramplot.m +++ b/core/@correlation/private/dendrogramplot.m @@ -32,7 +32,9 @@ % SWITCH X AXIS LABELS set(gca,'XDir','reverse'); -label = 1- str2num(get(gca,'XTickLabel')); +% Fix by GT based on email by Kyle Brill, July 2016, see Issue 51 +%label = 1- str2num(get(gca,'XTickLabel')); +label = 1- str2double(get(gca,'XTickLabel')); set(gca,'XTickLabel',label); %xlabel('distance (dissimilarlity)','FontSize',16); xlabel('inter-cluster correlation','FontSize',16); diff --git a/core/@correlation/stack.m b/core/@correlation/stack.m index 82eae93..b8e767f 100644 --- a/core/@correlation/stack.m +++ b/core/@correlation/stack.m @@ -50,7 +50,9 @@ c1 = correlation; c1 = set(c1,'WAVEFORM', get(c,'WAVEFORM') ); c1 = set(c1,'TRIG', get(c,'TRIG') ); -if exist('index') +% Fix by GT based on email from Kyle Brill, July 2016. See issue 51 +% if exist('index') +if exist('index', 'var') c1 = subset(c1,index); end