diff --git a/load_bruker.m b/load_bruker.m index f17c638..b9cfb69 100644 --- a/load_bruker.m +++ b/load_bruker.m @@ -51,7 +51,11 @@ params.mwPower = bruker_params.MWPW * 1e3; params.QValue = "NOT RECORDED"; params.mwAtten = str2double(extractBefore(string(bruker_params.PowerAtten),' ')); params.mwFreqs = "NOT RECORDED"; -params.Name = string(bruker_params.TITL); + +%get filename for further documentation and exporting figures +[datapath,dataname,~] = fileparts(corrpath); +params.Path = datapath; +params.Name = dataname; %echo what information is contained in the structure called 'params' params diff --git a/load_matlab.m b/load_matlab.m index 33a8347..2651886 100644 --- a/load_matlab.m +++ b/load_matlab.m @@ -28,12 +28,13 @@ function [Data,params] = load_matlab(path) % Name: "/some/path" %correct \ for / -corrpath = replace(path,"\","/") +corrpath = replace(path,"\","/"); load(corrpath,'Data','params') %get filename for further documentation and exporting figures -dataname = string(extractBefore(extractAfter(path,asManyOfPattern(wildcardPattern + "/")),'.')); +[datapath,dataname,~] = fileparts(corrpath); +params.Path = datapath; params.Name = dataname; %echo what information is contained in the structure called 'params'