%#ok<*NOPTS>
%%
% The template below is set to read a local file named 'myFile.dat'
% that is comma delimited with the following section identifications:
% o The data set section begins one row below the row with the string
%   'Specimen dimensions' contained within it.
% o The column header section begins at the row with the string
%   'Time' within it. 
% o No specific delimiter is specified for the end of the data set 
%   section. Internal automatic logic will be used. 
%
% If ADV options are needed, just add them after the rs3 argument in
% the usual way.  
 
dataDir = '../dataFiles'; 
fileName = 'tensionTest.txt'; 
fName = fullfile(dataDir, fileName);
delim = ',';
startStr = 'Specimen dimensions';
rs1 = 1;
colHeadStr = 'Time';
rs2 = 0;
endStr = [];
rs3 = [];
raw_3 = k_readText(fName,delim,startStr,rs1,colHeadStr,rs2,endStr,rs3);

%%
DatasetHeader = raw_3.Props.UserData.DatasetHeader;
params = k_unpackHeader(DatasetHeader, ':') 

%% 
Area = params('width') * params('thick')

raw_3('Strain') = raw_3('Ext') / params('gage length');
raw_3('Stress') = raw_3('Load') / Area;
raw_3('Strain') = raw_3('Strain').convert('%'); 

raw_3

