diff --git a/load_bruker.m b/load_bruker.m index f2a5aef..2997cd3 100644 --- a/load_bruker.m +++ b/load_bruker.m @@ -11,8 +11,11 @@ function [Data,params] = load_bruker(path) % % Note that this funtion is dependent on easyspin. +%correct \ for / +corrpath = replace(path,"\","/"); + %load Bruker data with help of easyspin -[bruker_axes,Data,bruker_params] = eprload(path); +[bruker_axes,Data,bruker_params] = eprload(corrpath); %assign metadata to custom params struct params.Field_Center = bruker_params.YMIN + 0.5*bruker_params.YWID; diff --git a/load_matlab.m b/load_matlab.m index 8e03e32..03613e9 100644 --- a/load_matlab.m +++ b/load_matlab.m @@ -7,7 +7,10 @@ function [Data,params] = load_matlab(path) % string. The extracted name is appended to the 'params' struct, whos % contents are displayed in the command window afterwards. -load(path,'Data','params') +%correct \ for / +corrpath = replace(path,"\","/") + +load(corrpath,'Data','params') %get filename for further documentation and exporting figures dataname = string(extractBefore(extractAfter(path,asManyOfPattern(wildcardPattern + "/")),'.'));