From f950d1ac7a338181e3d5605dc5547ab54003e9e5 Mon Sep 17 00:00:00 2001 From: zhoupc Date: Wed, 13 Dec 2017 12:35:14 -0600 Subject: [PATCH] fix a issue when matlab doesnot support parallel computation --- ca_source_extraction/endoscope/get_patch_data.m | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ca_source_extraction/endoscope/get_patch_data.m b/ca_source_extraction/endoscope/get_patch_data.m index 930cb44..372f9b4 100644 --- a/ca_source_extraction/endoscope/get_patch_data.m +++ b/ca_source_extraction/endoscope/get_patch_data.m @@ -13,7 +13,11 @@ end % check whether the code is running on a worker (for parallel processing) -isOnWorker = ~isempty(getCurrentTask()); +try + isOnWorker = ~isempty(getCurrentTask()); +catch + isOnWorker = false; +end %% check whether the mat_data has been loaded into the base space mat_file = mat_data.Properties.Source();