Skip to content

Commit 907a735

Browse files
committed
Merge branch 'pr/32'
2 parents 6fde0f8 + f352584 commit 907a735

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

bin/Murat_plot.m

+9-2
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,15 @@
242242
%%
243243
% Plots peak delays only keeping cells with more than 'factor'% of data
244244
factor = 5;
245-
keep_bins =...
246-
PD_cts > ((max(PD_cts(:))/100)*factor);
245+
246+
max_positive = max(mPD(mPD >= 0));
247+
max_negative = min(mPD(mPD < 0));
248+
positive_threshold = (max_positive / 100) * factor;
249+
negative_threshold = (max_negative / 100) * factor;
250+
keep_bins_positive = mPD > positive_threshold;
251+
keep_bins_negative = mPD < negative_threshold;
252+
keep_bins = keep_bins_positive | keep_bins_negative;
253+
247254
mPD_red = mPD.*keep_bins;
248255

249256
FName_PDMap =...

0 commit comments

Comments
 (0)