Finished objectifying #8

Merged
lschank7 merged 43 commits from objectify into master 2021-07-27 13:09:44 +00:00
2 changed files with 8 additions and 3 deletions
Showing only changes of commit 43184cd02f - Show all commits

View File

@ -51,7 +51,11 @@ params.mwPower = bruker_params.MWPW * 1e3;
params.QValue = "NOT RECORDED"; params.QValue = "NOT RECORDED";
params.mwAtten = str2double(extractBefore(string(bruker_params.PowerAtten),' ')); params.mwAtten = str2double(extractBefore(string(bruker_params.PowerAtten),' '));
params.mwFreqs = "NOT RECORDED"; 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' %echo what information is contained in the structure called 'params'
params params

View File

@ -28,12 +28,13 @@ function [Data,params] = load_matlab(path)
% Name: "/some/path" % Name: "/some/path"
%correct \ for / %correct \ for /
corrpath = replace(path,"\","/") corrpath = replace(path,"\","/");
load(corrpath,'Data','params') load(corrpath,'Data','params')
%get filename for further documentation and exporting figures %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; params.Name = dataname;
%echo what information is contained in the structure called 'params' %echo what information is contained in the structure called 'params'