From 4ce7344e876605d0db73578e098847a7d9867c28 Mon Sep 17 00:00:00 2001 From: Steve Miller Date: Sun, 15 Oct 2023 12:31:05 +0200 Subject: [PATCH] Fixed script that creates Data folder --- Workflows/Fault_Sweep/sm_pump_triplex_DOEdata_tocsv.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Workflows/Fault_Sweep/sm_pump_triplex_DOEdata_tocsv.m b/Workflows/Fault_Sweep/sm_pump_triplex_DOEdata_tocsv.m index 9bd036a..4c7dfc3 100644 --- a/Workflows/Fault_Sweep/sm_pump_triplex_DOEdata_tocsv.m +++ b/Workflows/Fault_Sweep/sm_pump_triplex_DOEdata_tocsv.m @@ -5,7 +5,9 @@ function sm_pump_triplex_DOEdata_tocsv(test_Data) % Copyright 2017-2022 The MathWorks, Inc. % Make data directory if it doesn't exist -if ~exist('Data', 'dir') + +cd(fileparts(which(mfilename'))); +if ~(isfolder([pwd filesep 'Data'])) mkdir('Data') end