r_inputdataSigmaX=[;];
r_inputdataSigmaY=[;];
r_inputdataTau=[;];
w_inputdataTau=[;];
w_inputdataSigmaY=[;];
w_inputdataSigmaX=[;];
cuttofflinesSigmaX=[;];
cuttofflinesSigmaY=[;];
cuttofflinesTau=[;];
r_inputdata_logic=zeros(1,3);
w_inputdata_logic=zeros(1,3);
inputdata_cuttofflines_logic=zeros(1,3);
default_value_z=1e8;
row1=0;
row2=0;
row3=0;
index_counter=1;
t=0;
wholecontent = fileread('MatlabExport_SigX_RF.txt')
sections = regexp(wholecontent, '\*+([^*]+)\*+([^*]+)', 'tokens')
for section = sections
switch(strtrim(section{1}{1}))
case 'Plot Page Options and Settings'
keyvalues = regexp(section{1}{2}, '([^\n\r=]+)=([^\n\r=]+)', 'tokens')
plotpageSettings = cell2table(vertcat(keyvalues{:}), 'VariableNames', {'Key', 'Value'})
case 'Diagram Options SigmaX'
keyvalues = regexp(section{1}{2}, '([^\n\r=]+)=([^\n\r=]+)', 'tokens')
diagramoptionsSigmaX = cell2table(vertcat(keyvalues{:}), 'VariableNames', {'Key', 'Value'})
case 'Diagram Options SigmaY'
keyvalues = regexp(section{1}{2}, '([^\n\r=]+)=([^\n\r=]+)', 'tokens')
diagramoptionsSigmaY = cell2table(vertcat(keyvalues{:}), 'VariableNames', {'Key', 'Value'})
case 'Diagram Options Tau'
keyvalues = regexp(section{1}{2}, '([^\n\r=]+)=([^\n\r=]+)', 'tokens')
diagramoptionsTau = cell2table(vertcat(keyvalues{:}), 'VariableNames', {'Key', 'Value'})
case 'Woehler Lines SigmaX'
keyvalues = regexp(section{1}{2}, '([^\n\r=]+)=([^\n\r=]+)', 'tokens')
w_diagramoptionsSigmaX = cell2table(vertcat(keyvalues{:}), 'VariableNames', {'Key', 'Value'})
w_inputdata_logic(1,1) = 1;
case 'Woehler Lines SigmaY'
keyvalues = regexp(section{1}{2}, '([^\n\r=]+)=([^\n\r=]+)', 'tokens')
w_diagramoptionsSigmaY = cell2table(vertcat(keyvalues{:}), 'VariableNames', {'Key', 'Value'})
w_inputdata_logic(1,2) = 1;
case 'Woehler Lines Tau'
keyvalues = regexp(section{1}{2}, '([^\n\r=]+)=([^\n\r=]+)', 'tokens')
w_diagramoptionsTau = cell2table(vertcat(keyvalues{:}), 'VariableNames', {'Key', 'Value'})
w_inputdata_logic(1,3) = 1;
case 'Rainflow Options SigmaX'
keyvalues = regexp(section{1}{2}, '([^\n\r=]+)=([^\n\r=]+)', 'tokens')
r_diagramoptionsSigmaX = cell2table(vertcat(keyvalues{:}), 'VariableNames', {'Key', 'Value'})
case 'Rainflow Options SigmaY'
keyvalues = regexp(section{1}{2}, '([^\n\r=]+)=([^\n\r=]+)', 'tokens')
r_diagramoptionsSigmaY = cell2table(vertcat(keyvalues{:}), 'VariableNames', {'Key', 'Value'})
case 'Rainflow Options Tau'
keyvalues = regexp(section{1}{2}, '([^\n\r=]+)=([^\n\r=]+)', 'tokens')
r_diagramoptionsTau = cell2table(vertcat(keyvalues{:}), 'VariableNames', {'Key', 'Value'})
case 'Rainflow Cutofflines SigmaX'
cuttofflinesSigmaX = cell2mat(textscan(section{1}{2}, '%f%f', 'HeaderLines', 1))
inputdata_cuttofflines_logic(1,1) = 1;
case 'Rainflow Cutofflines SigmaY'
cuttofflinesSigmaY = cell2mat(textscan(section{1}{2}, '%f%f', 'HeaderLines', 1))
inputdata_cuttofflines_logic(1,2) = 1;
case 'Rainflow Cutofflines Tau'
cuttofflinesTau = cell2mat(textscan(section{1}{2}, '%f%f', 'HeaderLines', 1))
inputdata_cuttofflines_logic(1,3) = 1;
case 'StressSpectrum Data SigmaX'
w_inputdataSigmaX = cell2mat(textscan(section{1}{2}, '%f%f', 'HeaderLines', 1))
case 'StressSpectrum Data SigmaY'
w_inputdataSigmaY = cell2mat(textscan(section{1}{2}, '%f%f', 'HeaderLines', 1))
case 'StressSpectrum Data Tau'
w_inputdataTau = cell2mat(textscan(section{1}{2}, '%f%f', 'HeaderLines', 1))
case 'Rainflow Data SigmaX'
r_inputdataSigmaX = cell2mat(textscan(section{1}{2}, '%f%f%f', 'HeaderLines', 1))
r_inputdata_logic(1,1) = 1;
case 'Rainflow Data SigmaY'
r_inputdataSigmaY = cell2mat(textscan(section{1}{2}, '%f%f%f', 'HeaderLines', 1))
r_inputdata_logic(1,2) = 1;
case 'Rainflow Data Tau'
r_inputdataTau = cell2mat(textscan(section{1}{2}, '%f%f%f', 'HeaderLines', 1))
r_inputdata_logic(1,3) = 1;
otherwise
warning('Unknown section ERROR: %s', section{1}{1})
end
end
if sum(w_inputdata_logic)==3 && sum(r_inputdata_logic)==3
counterx=6;
plotPositions = [ 3, 21, 8, 8;
12, 21, 8, 8;
3, 12, 8, 8;
12, 12, 8, 8;
3, 3, 8, 8;
12, 3, 8, 8];
new_plotPositions = plotPositions(1:counterx,1:4);
end
if sum(w_inputdata_logic)==1 && sum(r_inputdata_logic)==1
counterx=2;
plotPositions = [ 3, 21, 8, 8; 12, 21, 8, 8];
new_plotPositions = plotPositions(1:counterx,1:4);
end
if sum(w_inputdata_logic)==1 && sum(r_inputdata_logic)==0 || sum(w_inputdata_logic)==0 && sum(r_inputdata_logic)==1
counterx=1;
new_plotPositions = [ 3, 3, 21, 21]
end
fig = figure('Name','Page Header','Color',[1 1 0.9]);
fig.Units = 'centimeters';
fig.Position(3:4) = [30 30];
nPlots=length(new_plotPositions);
hAx=zeros(nPlots,1);
pageHeader=plotpageSettings.Value(strcmp(plotpageSettings.Key, 'pageheader'))
annotation(fig,'textbox',...
[0.0166903765690328 0.961151079136691 0.275150627615067 0.050359712230215],...
'String',pageHeader,...
'FontSize',20,...
'FitBoxToText','off',...
'EdgeColor','none');
for i = 1:size(new_plotPositions,1);
if counterx==1
plotHandle = subplot(1, 1, i);
m=1;
n=1;
hAx(i)=subplot(1, 1, i);
if w_inputdata_logic(1,1)==1
diagramheader=diagramoptionsSigmaX.Value(strcmp(diagramoptionsSigmaX.Key, 'w_diagramheaderSigmaX'))
labelabscissa=diagramoptionsSigmaX.Value(strcmp(diagramoptionsSigmaX.Key, 'w_labelabscissaSigmaX'))
labelordinate=diagramoptionsSigmaX.Value(strcmp(diagramoptionsSigmaX.Key, 'w_labelordinateSigmaX'))
ordinateLogarithmic=diagramoptionsSigmaX.Value(strcmp(diagramoptionsSigmaX.Key, 'w_ordinateLogarithmic'))
abscissaMin=str2double(diagramoptionsSigmaX.Value(strcmp(diagramoptionsSigmaX.Key, 'w_abscissaMinSigmaX')))
abscissaMax=str2double(diagramoptionsSigmaX.Value(strcmp(diagramoptionsSigmaX.Key, 'w_abscissaMaxSigmaX')))
ordinateMin=str2double(diagramoptionsSigmaX.Value(strcmp(diagramoptionsSigmaX.Key, 'w_ordinateMinSigmaX')))
ordinateMax=str2double(diagramoptionsSigmaX.Value(strcmp(diagramoptionsSigmaX.Key, 'w_ordinateMaxSigmaX')))
equivcycles=str2double(w_diagramoptionsSigmaX.Value(strcmp(w_diagramoptionsSigmaX.Key, 'equivcycles')))
equivstress=str2double(w_diagramoptionsSigmaX.Value(strcmp(w_diagramoptionsSigmaX.Key, 'equivstress')))
wsectionstart = str2double(strsplit(w_diagramoptionsSigmaX.Value{strcmp(w_diagramoptionsSigmaX.Key, 'wsectionstart')}));
wsectionsend = str2double(strsplit(w_diagramoptionsSigmaX.Value{strcmp(w_diagramoptionsSigmaX.Key, 'wsectionsend')}));
wsectionstartstress = str2double(strsplit(w_diagramoptionsSigmaX.Value{strcmp(w_diagramoptionsSigmaX.Key, 'wsectionstartstress')}));
wsectionlinestyle = strsplit(w_diagramoptionsSigmaX.Value{strcmp(w_diagramoptionsSigmaX.Key, 'wsectionlinestyle')});
wsectionslope = str2double(strsplit(w_diagramoptionsSigmaX.Value{strcmp(w_diagramoptionsSigmaX.Key, 'wsectionslope')}));
equilabel = w_diagramoptionsSigmaX.Value(strcmp(w_diagramoptionsSigmaX.Key, 'equilabel'))
spectrmaxlabel = w_diagramoptionsSigmaX.Value(strcmp(w_diagramoptionsSigmaX.Key, 'spectrmaxlabel'))
cutoffvalue = str2double(strsplit(w_diagramoptionsSigmaX.Value{strcmp(w_diagramoptionsSigmaX.Key, 'cutoffvalue')}));
end
if w_inputdata_logic(1,2)==1
diagramheader=diagramoptionsSigmaY.Value(strcmp(diagramoptionsSigmaY.Key, 'w_diagramheaderSigmaY'))
labelabscissa=diagramoptionsSigmaY.Value(strcmp(diagramoptionsSigmaY.Key, 'w_labelabscissaSigmaY'))
labelordinate=diagramoptionsSigmaY.Value(strcmp(diagramoptionsSigmaY.Key, 'w_labelordinateSigmaY'))
ordinateLogarithmic=diagramoptionsSigmaY.Value(strcmp(diagramoptionsSigmaY.Key, 'w_ordinateLogarithmic'))
abscissaMin=str2double(diagramoptionsSigmaY.Value(strcmp(diagramoptionsSigmaY.Key, 'w_abscissaMinSigmaY')))
abscissaMax=str2double(diagramoptionsSigmaY.Value(strcmp(diagramoptionsSigmaY.Key, 'w_abscissaMaxSigmaY')))
ordinateMin=str2double(diagramoptionsSigmaY.Value(strcmp(diagramoptionsSigmaY.Key, 'w_ordinateMinSigmaY')))
ordinateMax=str2double(diagramoptionsSigmaY.Value(strcmp(diagramoptionsSigmaY.Key, 'w_ordinateMaxSigmaY')))
equivcycles=str2double(w_diagramoptionsSigmaY.Value(strcmp(w_diagramoptionsSigmaY.Key, 'equivcycles')))
equivstress=str2double(w_diagramoptionsSigmaY.Value(strcmp(w_diagramoptionsSigmaY.Key, 'equivstress')))
wsectionstart = str2double(strsplit(w_diagramoptionsSigmaY.Value{strcmp(w_diagramoptionsSigmaY.Key, 'wsectionstart')}));
wsectionsend = str2double(strsplit(w_diagramoptionsSigmaY.Value{strcmp(w_diagramoptionsSigmaY.Key, 'wsectionsend')}));
wsectionstartstress = str2double(strsplit(w_diagramoptionsSigmaY.Value{strcmp(w_diagramoptionsSigmaY.Key, 'wsectionstartstress')}));
wsectionlinestyle = strsplit(w_diagramoptionsSigmaY.Value{strcmp(w_diagramoptionsSigmaY.Key, 'wsectionlinestyle')});
wsectionslope = str2double(strsplit(w_diagramoptionsSigmaY.Value{strcmp(w_diagramoptionsSigmaY.Key, 'wsectionslope')}));
equilabel = w_diagramoptionsSigmaY.Value(strcmp(w_diagramoptionsSigmaY.Key, 'equilabel'))
spectrmaxlabel = w_diagramoptionsSigmaY.Value(strcmp(w_diagramoptionsSigmaY.Key, 'spectrmaxlabel'))
cutoffvalue = str2double(strsplit(w_diagramoptionsSigmaY.Value{strcmp(w_diagramoptionsSigmaY.Key, 'cutoffvalue')}));
end
if w_inputdata_logic(1,3)==1
diagramheader=diagramoptionsTau.Value(strcmp(diagramoptionsTau.Key, 'w_diagramheaderTau'))
labelabscissa=diagramoptionsTau.Value(strcmp(diagramoptionsTau.Key, 'w_labelabscissaTau'))
labelordinate=diagramoptionsTau.Value(strcmp(diagramoptionsTau.Key, 'w_labelordinateTau'))
ordinateLogarithmic=diagramoptionsTau.Value(strcmp(diagramoptionsTau.Key, 'w_ordinateLogarithmic'))
abscissaMin=str2double(diagramoptionsTau.Value(strcmp(diagramoptionsTau.Key, 'w_abscissaMinTau')))
abscissaMax=str2double(diagramoptionsTau.Value(strcmp(diagramoptionsTau.Key, 'w_abscissaMaxTau')))
ordinateMin=str2double(diagramoptionsTau.Value(strcmp(diagramoptionsTau.Key, 'w_ordinateMinTau')))
ordinateMax=str2double(diagramoptionsTau.Value(strcmp(diagramoptionsTau.Key, 'w_ordinateMaxTau')))
equivcycles=str2double(w_diagramoptionsTau.Value(strcmp(w_diagramoptionsTau.Key, 'equivcycles')))
equivstress=str2double(w_diagramoptionsTau.Value(strcmp(w_diagramoptionsTau.Key, 'equivstress')))
wsectionstart = str2double(strsplit(w_diagramoptionsTau.Value{strcmp(w_diagramoptionsTau.Key, 'wsectionstart')}));
wsectionsend = str2double(strsplit(w_diagramoptionsTau.Value{strcmp(w_diagramoptionsTau.Key, 'wsectionsend')}));
wsectionstartstress = str2double(strsplit(w_diagramoptionsTau.Value{strcmp(w_diagramoptionsTau.Key, 'wsectionstartstress')}));
wsectionlinestyle = strsplit(w_diagramoptionsTau.Value{strcmp(w_diagramoptionsTau.Key, 'wsectionlinestyle')});
equilabel = w_diagramoptionsTau.Value(strcmp(w_diagramoptionsTau.Key, 'equilabel'))
spectrmaxlabel = w_diagramoptionsTau.Value(strcmp(w_diagramoptionsTau.Key, 'spectrmaxlabel'))
cutoffvalue = str2double(strsplit(w_diagramoptionsTau.Value{strcmp(w_diagramoptionsTau.Key, 'cutoffvalue')}));
end
if r_inputdata_logic(1,1)==1
diagramheader=diagramoptionsSigmaX.Value(strcmp(diagramoptionsSigmaX.Key, 'r_diagramheaderSigmaX'))
labelabscissa=diagramoptionsSigmaX.Value(strcmp(diagramoptionsSigmaX.Key, 'r_labelabscissaSigmaX'))
labelordinate=diagramoptionsSigmaX.Value(strcmp(diagramoptionsSigmaX.Key, 'r_labelordinateSigmaX'))
ordinateLogarithmic=diagramoptionsSigmaX.Value(strcmp(diagramoptionsSigmaX.Key, 'r_ordinateLogarithmic'))
abscissaMin=str2double(diagramoptionsSigmaX.Value(strcmp(diagramoptionsSigmaX.Key, 'r_abscissaMinSigmaX')))
abscissaMax=str2double(diagramoptionsSigmaX.Value(strcmp(diagramoptionsSigmaX.Key, 'r_abscissaMaxSigmaX')))
ordinateMin=str2double(diagramoptionsSigmaX.Value(strcmp(diagramoptionsSigmaX.Key, 'r_ordinateMinSigmaX')))
ordinateMax=str2double(diagramoptionsSigmaX.Value(strcmp(diagramoptionsSigmaX.Key, 'r_ordinateMaxSigmaX')))
end
if r_inputdata_logic(1,2)==1
diagramheader=diagramoptionsSigmaY.Value(strcmp(diagramoptionsSigmaY.Key, 'r_diagramheaderSigmaY'))
labelabscissa=diagramoptionsSigmaY.Value(strcmp(diagramoptionsSigmaY.Key, 'r_labelabscissaSigmaY'))
labelordinate=diagramoptionsSigmaY.Value(strcmp(diagramoptionsSigmaY.Key, 'r_labelordinateSigmaY'))
ordinateLogarithmic=diagramoptionsSigmaY.Value(strcmp(diagramoptionsSigmaY.Key, 'r_ordinateLogarithmic'))
abscissaMin=str2double(diagramoptionsSigmaY.Value(strcmp(diagramoptionsSigmaY.Key, 'r_abscissaMinSigmaY')))
abscissaMax=str2double(diagramoptionsSigmaY.Value(strcmp(diagramoptionsSigmaY.Key, 'r_abscissaMaxSigmaY')))
ordinateMin=str2double(diagramoptionsSigmaY.Value(strcmp(diagramoptionsSigmaY.Key, 'r_ordinateMinSigmaY')))
ordinateMax=str2double(diagramoptionsSigmaY.Value(strcmp(diagramoptionsSigmaY.Key, 'r_ordinateMaxSigmaY')))
end
if r_inputdata_logic(1,3)==1
diagramheader=diagramoptionsTau.Value(strcmp(diagramoptionsTau.Key, 'r_diagramheaderTau'))
labelabscissa=diagramoptionsTau.Value(strcmp(diagramoptionsTau.Key, 'r_labelabscissaTau'))
labelordinate=diagramoptionsTau.Value(strcmp(diagramoptionsTau.Key, 'r_labelordinateTau'))
ordinateLogarithmic=diagramoptionsTau.Value(strcmp(diagramoptionsTau.Key, 'r_ordinateLogarithmic'))
abscissaMin=str2double(diagramoptionsTau.Value(strcmp(diagramoptionsTau.Key, 'r_abscissaMinTau')))
abscissaMax=str2double(diagramoptionsTau.Value(strcmp(diagramoptionsTau.Key, 'r_abscissaMaxTau')))
ordinateMin=str2double(diagramoptionsTau.Value(strcmp(diagramoptionsTau.Key, 'r_ordinateMinTau')))
ordinateMax=str2double(diagramoptionsTau.Value(strcmp(diagramoptionsTau.Key, 'r_ordinateMaxTau')))
end
end
if counterx==2
plotHandle = subplot(2, 2, i);
m=2;
n=1;
hAx(i)=subplot(2, 2, i);
if r_inputdata_logic(1,1)==1 && row1==0
diagramheader=diagramoptionsSigmaX.Value(strcmp(diagramoptionsSigmaX.Key, 'r_diagramheaderSigmaX'))
labelabscissa=diagramoptionsSigmaX.Value(strcmp(diagramoptionsSigmaX.Key, 'r_labelabscissaSigmaX'))
labelordinate=diagramoptionsSigmaX.Value(strcmp(diagramoptionsSigmaX.Key, 'r_labelordinateSigmaX'))
abscissaMin=str2double(diagramoptionsSigmaX.Value(strcmp(diagramoptionsSigmaX.Key, 'r_abscissaMinSigmaX')))
abscissaMax=str2double(diagramoptionsSigmaX.Value(strcmp(diagramoptionsSigmaX.Key, 'r_abscissaMaxSigmaX')))
ordinateMin=str2double(diagramoptionsSigmaX.Value(strcmp(diagramoptionsSigmaX.Key, 'r_ordinateMinSigmaX')))
ordinateMax=str2double(diagramoptionsSigmaX.Value(strcmp(diagramoptionsSigmaX.Key, 'r_ordinateMaxSigmaX')))
row1=1
logical_1=0;
end
if r_inputdata_logic(1,2)==1 && row2==0
diagramheader=diagramoptionsSigmaY.Value(strcmp(diagramoptionsSigmaY.Key, 'r_diagramheaderSigmaY'))
labelabscissa=diagramoptionsSigmaY.Value(strcmp(diagramoptionsSigmaY.Key, 'r_labelabscissaSigmaY'))
labelordinate=diagramoptionsSigmaY.Value(strcmp(diagramoptionsSigmaY.Key, 'r_labelordinateSigmaY'))
abscissaMin=str2double(diagramoptionsSigmaY.Value(strcmp(diagramoptionsSigmaY.Key, 'r_abscissaMinSigmaY')))
abscissaMax=str2double(diagramoptionsSigmaY.Value(strcmp(diagramoptionsSigmaY.Key, 'r_abscissaMaxSigmaY')))
ordinateMin=str2double(diagramoptionsSigmaY.Value(strcmp(diagramoptionsSigmaY.Key, 'r_ordinateMinSigmaY')))
ordinateMax=str2double(diagramoptionsSigmaY.Value(strcmp(diagramoptionsSigmaY.Key, 'r_ordinateMaxSigmaY')))
row2=1;
logical_1=0;
end
if r_inputdata_logic(1,3)==1 && row3==0
diagramheader=diagramoptionsTau.Value(strcmp(diagramoptionsTau.Key, 'r_diagramheaderTau'))
labelabscissa=diagramoptionsTau.Value(strcmp(diagramoptionsTau.Key, 'r_labelabscissaTau'))
labelordinate=diagramoptionsTau.Value(strcmp(diagramoptionsTau.Key, 'r_labelordinateTau'))
abscissaMin=str2double(diagramoptionsTau.Value(strcmp(diagramoptionsTau.Key, 'r_abscissaMinTau')))
abscissaMax=str2double(diagramoptionsTau.Value(strcmp(diagramoptionsTau.Key, 'r_abscissaMaxTau')))
ordinateMin=str2double(diagramoptionsTau.Value(strcmp(diagramoptionsTau.Key, 'r_ordinateMinTau')))
ordinateMax=str2double(diagramoptionsTau.Value(strcmp(diagramoptionsTau.Key, 'r_ordinateMaxTau')))
row3=1
logical_1=0;
end
if w_inputdata_logic(1,1)==1 && logical_1==1
diagramheader=diagramoptionsSigmaX.Value(strcmp(diagramoptionsSigmaX.Key, 'w_diagramheaderSigmaX'))
labelabscissa=diagramoptionsSigmaX.Value(strcmp(diagramoptionsSigmaX.Key, 'w_labelabscissaSigmaX'))
labelordinate=diagramoptionsSigmaX.Value(strcmp(diagramoptionsSigmaX.Key, 'w_labelordinateSigmaX'))
ordinateLogarithmic=diagramoptionsSigmaX.Value(strcmp(diagramoptionsSigmaX.Key, 'w_ordinateLogarithmic'))
abscissaMin=str2double(diagramoptionsSigmaX.Value(strcmp(diagramoptionsSigmaX.Key, 'w_abscissaMinSigmaX')))
abscissaMax=str2double(diagramoptionsSigmaX.Value(strcmp(diagramoptionsSigmaX.Key, 'w_abscissaMaxSigmaX')))
ordinateMin=str2double(diagramoptionsSigmaX.Value(strcmp(diagramoptionsSigmaX.Key, 'w_ordinateMinSigmaX')))
ordinateMax=str2double(diagramoptionsSigmaX.Value(strcmp(diagramoptionsSigmaX.Key, 'w_ordinateMaxSigmaX')))
equivcycles=str2double(w_diagramoptionsSigmaX.Value(strcmp(w_diagramoptionsSigmaX.Key, 'equivcycles')))
equivstress=str2double(w_diagramoptionsSigmaX.Value(strcmp(w_diagramoptionsSigmaX.Key, 'equivstress')))
wsectionstart = str2double(strsplit(w_diagramoptionsSigmaX.Value{strcmp(w_diagramoptionsSigmaX.Key, 'wsectionstart')}));
wsectionsend = str2double(strsplit(w_diagramoptionsSigmaX.Value{strcmp(w_diagramoptionsSigmaX.Key, 'wsectionsend')}));
wsectionstartstress = str2double(strsplit(w_diagramoptionsSigmaX.Value{strcmp(w_diagramoptionsSigmaX.Key, 'wsectionstartstress')}));
wsectionlinestyle = strsplit(w_diagramoptionsSigmaX.Value{strcmp(w_diagramoptionsSigmaX.Key, 'wsectionlinestyle')});
wsectionslope = str2double(strsplit(w_diagramoptionsSigmaX.Value{strcmp(w_diagramoptionsSigmaX.Key, 'wsectionslope')}));
equilabel = w_diagramoptionsSigmaX.Value(strcmp(w_diagramoptionsSigmaX.Key, 'equilabel'))
spectrmaxlabel = w_diagramoptionsSigmaX.Value(strcmp(w_diagramoptionsSigmaX.Key, 'spectrmaxlabel'))
cutoffvalue = str2double(strsplit(w_diagramoptionsSigmaX.Value{strcmp(w_diagramoptionsSigmaX.Key, 'cutoffvalue')}));
end
if w_inputdata_logic(1,2)==1 && logical_1==1
diagramheader=diagramoptionsSigmaY.Value(strcmp(diagramoptionsSigmaY.Key, 'w_diagramheaderSigmaY'))
labelabscissa=diagramoptionsSigmaY.Value(strcmp(diagramoptionsSigmaY.Key, 'w_labelabscissaSigmaY'))
labelordinate=diagramoptionsSigmaY.Value(strcmp(diagramoptionsSigmaY.Key, 'w_labelordinateSigmaY'))
ordinateLogarithmic=diagramoptionsSigmaY.Value(strcmp(diagramoptionsSigmaY.Key, 'w_ordinateLogarithmic'))
abscissaMin=str2double(diagramoptionsSigmaY.Value(strcmp(diagramoptionsSigmaY.Key, 'w_abscissaMinSigmaY')))
abscissaMax=str2double(diagramoptionsSigmaY.Value(strcmp(diagramoptionsSigmaY.Key, 'w_abscissaMaxSigmaY')))
ordinateMin=str2double(diagramoptionsSigmaY.Value(strcmp(diagramoptionsSigmaY.Key, 'w_ordinateMinSigmaY')))
ordinateMax=str2double(diagramoptionsSigmaY.Value(strcmp(diagramoptionsSigmaY.Key, 'w_ordinateMaxSigmaY')))
equivcycles=str2double(w_diagramoptionsSigmaY.Value(strcmp(w_diagramoptionsSigmaY.Key, 'equivcycles')))
equivstress=str2double(w_diagramoptionsSigmaY.Value(strcmp(w_diagramoptionsSigmaY.Key, 'equivstress')))
wsectionstart = str2double(strsplit(w_diagramoptionsSigmaY.Value{strcmp(w_diagramoptionsSigmaY.Key, 'wsectionstart')}));
wsectionsend = str2double(strsplit(w_diagramoptionsSigmaY.Value{strcmp(w_diagramoptionsSigmaY.Key, 'wsectionsend')}));
wsectionstartstress = str2double(strsplit(w_diagramoptionsSigmaY.Value{strcmp(w_diagramoptionsSigmaY.Key, 'wsectionstartstress')}));
wsectionlinestyle = strsplit(w_diagramoptionsSigmaY.Value{strcmp(w_diagramoptionsSigmaY.Key, 'wsectionlinestyle')});
wsectionslope = str2double(strsplit(w_diagramoptionsSigmaY.Value{strcmp(w_diagramoptionsSigmaY.Key, 'wsectionslope')}));
equilabel = w_diagramoptionsSigmaY.Value(strcmp(w_diagramoptionsSigmaY.Key, 'equilabel'))
spectrmaxlabel = w_diagramoptionsSigmaY.Value(strcmp(w_diagramoptionsSigmaY.Key, 'spectrmaxlabel'))
cutoffvalue = str2double(strsplit(w_diagramoptionsSigmaY.Value{strcmp(w_diagramoptionsSigmaY.Key, 'cutoffvalue')}));
end
if w_inputdata_logic(1,3)==1 && logical_1==1
diagramheader=diagramoptionsTau.Value(strcmp(diagramoptionsTau.Key, 'w_diagramheaderTau'))
labelabscissa=diagramoptionsTau.Value(strcmp(diagramoptionsTau.Key, 'w_labelabscissaTau'))
labelordinate=diagramoptionsTau.Value(strcmp(diagramoptionsTau.Key, 'w_labelordinateTau'))
ordinateLogarithmic=diagramoptionsTau.Value(strcmp(diagramoptionsTau.Key, 'w_ordinateLogarithmic'))
abscissaMin=str2double(diagramoptionsTau.Value(strcmp(diagramoptionsTau.Key, 'w_abscissaMinTau')))
abscissaMax=str2double(diagramoptionsTau.Value(strcmp(diagramoptionsTau.Key, 'w_abscissaMaxTau')))
ordinateMin=str2double(diagramoptionsTau.Value(strcmp(diagramoptionsTau.Key, 'w_ordinateMinTau')))
ordinateMax=str2double(diagramoptionsTau.Value(strcmp(diagramoptionsTau.Key, 'w_ordinateMaxTau')))
equivcycles=str2double(w_diagramoptionsTau.Value(strcmp(w_diagramoptionsTau.Key, 'equivcycles')))
equivstress=str2double(w_diagramoptionsTau.Value(strcmp(w_diagramoptionsTau.Key, 'equivstress')))
wsectionstart = str2double(strsplit(w_diagramoptionsTau.Value{strcmp(w_diagramoptionsTau.Key, 'wsectionstart')}));
wsectionsend = str2double(strsplit(w_diagramoptionsTau.Value{strcmp(w_diagramoptionsTau.Key, 'wsectionsend')}));
wsectionstartstress = str2double(strsplit(w_diagramoptionsTau.Value{strcmp(w_diagramoptionsTau.Key, 'wsectionstartstress')}));
wsectionlinestyle = strsplit(w_diagramoptionsTau.Value{strcmp(w_diagramoptionsTau.Key, 'wsectionlinestyle')});
equilabel = w_diagramoptionsTau.Value(strcmp(w_diagramoptionsTau.Key, 'equilabel'))
spectrmaxlabel = w_diagramoptionsTau.Value(strcmp(w_diagramoptionsTau.Key, 'spectrmaxlabel'))
cutoffvalue = str2double(strsplit(w_diagramoptionsTau.Value{strcmp(w_diagramoptionsTau.Key, 'cutoffvalue')}));
end
logical_1=1;
end
if counterx==6
plotHandle = subplot(3, 2, i);
m=2;
n=3;
hAx(i)=subplot(3, 2, i);
if w_inputdata_logic(1,1)==1 && i==2
diagramheader=diagramoptionsSigmaX.Value(strcmp(diagramoptionsSigmaX.Key, 'w_diagramheaderSigmaX'))
labelabscissa=diagramoptionsSigmaX.Value(strcmp(diagramoptionsSigmaX.Key, 'w_labelabscissaSigmaX'))
labelordinate=diagramoptionsSigmaX.Value(strcmp(diagramoptionsSigmaX.Key, 'w_labelordinateSigmaX'))
ordinateLogarithmic=diagramoptionsSigmaX.Value(strcmp(diagramoptionsSigmaX.Key, 'w_ordinateLogarithmic'))
abscissaMin=str2double(diagramoptionsSigmaX.Value(strcmp(diagramoptionsSigmaX.Key, 'w_abscissaMinSigmaX')))
abscissaMax=str2double(diagramoptionsSigmaX.Value(strcmp(diagramoptionsSigmaX.Key, 'w_abscissaMaxSigmaX')))
ordinateMin=str2double(diagramoptionsSigmaX.Value(strcmp(diagramoptionsSigmaX.Key, 'w_ordinateMinSigmaX')))
ordinateMax=str2double(diagramoptionsSigmaX.Value(strcmp(diagramoptionsSigmaX.Key, 'w_ordinateMaxSigmaX')))
equivcycles=str2double(w_diagramoptionsSigmaX.Value(strcmp(w_diagramoptionsSigmaX.Key, 'equivcycles')))
equivstress=str2double(w_diagramoptionsSigmaX.Value(strcmp(w_diagramoptionsSigmaX.Key, 'equivstress')))
wsectionstart = str2double(strsplit(w_diagramoptionsSigmaX.Value{strcmp(w_diagramoptionsSigmaX.Key, 'wsectionstart')}));
wsectionsend = str2double(strsplit(w_diagramoptionsSigmaX.Value{strcmp(w_diagramoptionsSigmaX.Key, 'wsectionsend')}));
wsectionstartstress = str2double(strsplit(w_diagramoptionsSigmaX.Value{strcmp(w_diagramoptionsSigmaX.Key, 'wsectionstartstress')}));
wsectionlinestyle = strsplit(w_diagramoptionsSigmaX.Value{strcmp(w_diagramoptionsSigmaX.Key, 'wsectionlinestyle')});
wsectionslope = str2double(strsplit(w_diagramoptionsSigmaX.Value{strcmp(w_diagramoptionsSigmaX.Key, 'wsectionslope')}));
equilabel = w_diagramoptionsSigmaX.Value(strcmp(w_diagramoptionsSigmaX.Key, 'equilabel'))
spectrmaxlabel = w_diagramoptionsSigmaX.Value(strcmp(w_diagramoptionsSigmaX.Key, 'spectrmaxlabel'))
cutoffvalue = str2double(strsplit(w_diagramoptionsSigmaX.Value{strcmp(w_diagramoptionsSigmaX.Key, 'cutoffvalue')}));
end
if w_inputdata_logic(1,2)==1 && i==4
diagramheader=diagramoptionsSigmaY.Value(strcmp(diagramoptionsSigmaY.Key, 'w_diagramheaderSigmaY'))
labelabscissa=diagramoptionsSigmaY.Value(strcmp(diagramoptionsSigmaY.Key, 'w_labelabscissaSigmaY'))
labelordinate=diagramoptionsSigmaY.Value(strcmp(diagramoptionsSigmaY.Key, 'w_labelordinateSigmaY'))
ordinateLogarithmic=diagramoptionsSigmaY.Value(strcmp(diagramoptionsSigmaY.Key, 'w_ordinateLogarithmic'))
abscissaMin=str2double(diagramoptionsSigmaY.Value(strcmp(diagramoptionsSigmaY.Key, 'w_abscissaMinSigmaY')))
abscissaMax=str2double(diagramoptionsSigmaY.Value(strcmp(diagramoptionsSigmaY.Key, 'w_abscissaMaxSigmaY')))
ordinateMin=str2double(diagramoptionsSigmaY.Value(strcmp(diagramoptionsSigmaY.Key, 'w_ordinateMinSigmaY')))
ordinateMax=str2double(diagramoptionsSigmaY.Value(strcmp(diagramoptionsSigmaY.Key, 'w_ordinateMaxSigmaY')))
equivcycles=str2double(w_diagramoptionsSigmaY.Value(strcmp(w_diagramoptionsSigmaY.Key, 'equivcycles')))
equivstress=str2double(w_diagramoptionsSigmaY.Value(strcmp(w_diagramoptionsSigmaY.Key, 'equivstress')))
wsectionstart = str2double(strsplit(w_diagramoptionsSigmaY.Value{strcmp(w_diagramoptionsSigmaY.Key, 'wsectionstart')}));
wsectionsend = str2double(strsplit(w_diagramoptionsSigmaY.Value{strcmp(w_diagramoptionsSigmaY.Key, 'wsectionsend')}));
wsectionstartstress = str2double(strsplit(w_diagramoptionsSigmaY.Value{strcmp(w_diagramoptionsSigmaY.Key, 'wsectionstartstress')}));
wsectionlinestyle = strsplit(w_diagramoptionsSigmaY.Value{strcmp(w_diagramoptionsSigmaY.Key, 'wsectionlinestyle')});
wsectionslope = str2double(strsplit(w_diagramoptionsSigmaY.Value{strcmp(w_diagramoptionsSigmaY.Key, 'wsectionslope')}));
equilabel = w_diagramoptionsSigmaY.Value(strcmp(w_diagramoptionsSigmaY.Key, 'equilabel'))
spectrmaxlabel = w_diagramoptionsSigmaY.Value(strcmp(w_diagramoptionsSigmaY.Key, 'spectrmaxlabel'))
cutoffvalue = str2double(strsplit(w_diagramoptionsSigmaY.Value{strcmp(w_diagramoptionsSigmaY.Key, 'cutoffvalue')}));
end
if w_inputdata_logic(1,3)==1 && i==6
diagramheader=diagramoptionsTau.Value(strcmp(diagramoptionsTau.Key, 'w_diagramheaderTau'))
labelabscissa=diagramoptionsTau.Value(strcmp(diagramoptionsTau.Key, 'w_labelabscissaTau'))
labelordinate=diagramoptionsTau.Value(strcmp(diagramoptionsTau.Key, 'w_labelordinateTau'))
ordinateLogarithmic=diagramoptionsTau.Value(strcmp(diagramoptionsTau.Key, 'w_ordinateLogarithmic'))
abscissaMin=str2double(diagramoptionsTau.Value(strcmp(diagramoptionsTau.Key, 'w_abscissaMinTau')))
abscissaMax=str2double(diagramoptionsTau.Value(strcmp(diagramoptionsTau.Key, 'w_abscissaMaxTau')))
ordinateMin=str2double(diagramoptionsTau.Value(strcmp(diagramoptionsTau.Key, 'w_ordinateMinTau')))
ordinateMax=str2double(diagramoptionsTau.Value(strcmp(diagramoptionsTau.Key, 'w_ordinateMaxTau')))
equivcycles=str2double(w_diagramoptionsTau.Value(strcmp(w_diagramoptionsTau.Key, 'equivcycles')))
equivstress=str2double(w_diagramoptionsTau.Value(strcmp(w_diagramoptionsTau.Key, 'equivstress')))
wsectionstart = str2double(strsplit(w_diagramoptionsTau.Value{strcmp(w_diagramoptionsTau.Key, 'wsectionstart')}));
wsectionsend = str2double(strsplit(w_diagramoptionsTau.Value{strcmp(w_diagramoptionsTau.Key, 'wsectionsend')}));
wsectionstartstress = str2double(strsplit(w_diagramoptionsTau.Value{strcmp(w_diagramoptionsTau.Key, 'wsectionstartstress')}));
wsectionlinestyle = strsplit(w_diagramoptionsTau.Value{strcmp(w_diagramoptionsTau.Key, 'wsectionlinestyle')});
equilabel = w_diagramoptionsTau.Value(strcmp(w_diagramoptionsTau.Key, 'equilabel'))
spectrmaxlabel = w_diagramoptionsTau.Value(strcmp(w_diagramoptionsTau.Key, 'spectrmaxlabel'))
cutoffvalue = str2double(strsplit(w_diagramoptionsTau.Value{strcmp(w_diagramoptionsTau.Key, 'cutoffvalue')}));
end
if r_inputdata_logic(1,1)==1 && i==1
diagramheader=diagramoptionsSigmaX.Value(strcmp(diagramoptionsSigmaX.Key, 'r_diagramheaderSigmaX'))
labelabscissa=diagramoptionsSigmaX.Value(strcmp(diagramoptionsSigmaX.Key, 'r_labelabscissaSigmaX'))
labelordinate=diagramoptionsSigmaX.Value(strcmp(diagramoptionsSigmaX.Key, 'r_labelordinateSigmaX'))
abscissaMin=str2double(diagramoptionsSigmaX.Value(strcmp(diagramoptionsSigmaX.Key, 'r_abscissaMinSigmaX')))
abscissaMax=str2double(diagramoptionsSigmaX.Value(strcmp(diagramoptionsSigmaX.Key, 'r_abscissaMaxSigmaX')))
ordinateMin=str2double(diagramoptionsSigmaX.Value(strcmp(diagramoptionsSigmaX.Key, 'r_ordinateMinSigmaX')))
ordinateMax=str2double(diagramoptionsSigmaX.Value(strcmp(diagramoptionsSigmaX.Key, 'r_ordinateMaxSigmaX')))
end
if r_inputdata_logic(1,2)==1 && i==3
diagramheader=diagramoptionsSigmaY.Value(strcmp(diagramoptionsSigmaY.Key, 'r_diagramheaderSigmaY'))
labelabscissa=diagramoptionsSigmaY.Value(strcmp(diagramoptionsSigmaY.Key, 'r_labelabscissaSigmaY'))
labelordinate=diagramoptionsSigmaY.Value(strcmp(diagramoptionsSigmaY.Key, 'r_labelordinateSigmaY'))
abscissaMin=str2double(diagramoptionsSigmaY.Value(strcmp(diagramoptionsSigmaY.Key, 'r_abscissaMinSigmaY')))
abscissaMax=str2double(diagramoptionsSigmaY.Value(strcmp(diagramoptionsSigmaY.Key, 'r_abscissaMaxSigmaY')))
ordinateMin=str2double(diagramoptionsSigmaY.Value(strcmp(diagramoptionsSigmaY.Key, 'r_ordinateMinSigmaY')))
ordinateMax=str2double(diagramoptionsSigmaY.Value(strcmp(diagramoptionsSigmaY.Key, 'r_ordinateMaxSigmaY')))
end
if r_inputdata_logic(1,3)==1 && i==5
diagramheader=diagramoptionsTau.Value(strcmp(diagramoptionsTau.Key, 'r_diagramheaderTau'))
labelabscissa=diagramoptionsTau.Value(strcmp(diagramoptionsTau.Key, 'r_labelabscissaTau'))
labelordinate=diagramoptionsTau.Value(strcmp(diagramoptionsTau.Key, 'r_labelordinateTau'))
abscissaMin=str2double(diagramoptionsTau.Value(strcmp(diagramoptionsTau.Key, 'r_abscissaMinTau')))
abscissaMax=str2double(diagramoptionsTau.Value(strcmp(diagramoptionsTau.Key, 'r_abscissaMaxTau')))
ordinateMin=str2double(diagramoptionsTau.Value(strcmp(diagramoptionsTau.Key, 'r_ordinateMinTau')))
ordinateMax=str2double(diagramoptionsTau.Value(strcmp(diagramoptionsTau.Key, 'r_ordinateMaxTau')))
end
end
plotHandle.Units = 'centimeters';
plotHandle.Position = new_plotPositions(i,:);
box(subplot(n, m, i),'on');
hAx(i)=subplot(n, m, i);
axis(hAx(i),[ abscissaMin abscissaMax ordinateMin ordinateMax]);
set(subplot(n,m, i),'FontAngle','italic');
set(subplot(n, m, i),'FontSize',11);
set(subplot(n, m, i),'FontWeight','bold');
set(subplot(n, m, i),'XMinorTick','on');
set(subplot(n, m, i),'XGrid','on');
set(subplot(n, m, i),'YGrid','on');
set(subplot(n, m, i),'YScale','linear');
set(subplot(n, m, i),'XColor',[0 0 0]);
set(subplot(n, m, i),'YColor',[0 0 0]);
title1=subplot(n, m, i)
title(title1,diagramheader)
labelabscissa1=subplot(n, m, i)
labelordinate1=subplot(n, m, i)
if i==2 || i==4 || i==6 || counterx==1
logarithmic1=subplot(n, m, i)
bool = strcmp(ordinateLogarithmic,'true')
if bool==1
logarithmic='log'
set(subplot(n, m, i),'XScale',logarithmic);
else
logarithmic='linear'
set(subplot(n, m, i),'XScale',logarithmic);
end
end
xlabel(labelabscissa1,labelabscissa);
ylabel(labelordinate1,labelordinate);
hold on
end
pageHeader=plotpageSettings.Value(strcmp(plotpageSettings.Key, 'pageheader'))
annotation(fig,'textbox',...
[0.0166903765690328 0.961151079136691 0.275150627615067 0.050359712230215],...
'String',pageHeader,...
'FontSize',20,...
'FitBoxToText','off',...
'EdgeColor','none');
hold on;
[row_count_SigmaX,r]=size(r_inputdataSigmaX);
[row_count_SigmaY,e]=size(r_inputdataSigmaY);
[row_count_Tau,f]=size(r_inputdataTau);
row_maximum=row_count_SigmaX;
matrix_reference=r_inputdataSigmaX
if row_count_SigmaX<row_count_SigmaY
row_maximum=row_count_SigmaY;
matrix_reference=r_inputdataSigmaY
end
if row_count_Tau>row_maximum
row_maximum=row_count_Tau;
matrix_reference=r_inputdataTau
end
if row_count_SigmaX < row_maximum
ref=zeros(row_maximum-size(r_inputdataSigmaX,1),3)
r_inputdataSigmaX = vertcat(r_inputdataSigmaX,ref)
end
if row_count_SigmaY<row_maximum
ref=zeros(row_maximum-size(r_inputdataSigmaY,1),3)
r_inputdataSigmaY = vertcat(r_inputdataSigmaY,ref)
end
if row_count_Tau<row_maximum
ref=zeros(row_maximum-size(r_inputdataTau,1),3)
r_inputdataTau = vertcat(r_inputdataTau,ref)
end
input_data_rainflow=horzcat(r_inputdataSigmaX,r_inputdataSigmaY,r_inputdataTau);
[row_count_SigmaX,r]=size(cuttofflinesSigmaX);
[row_count_SigmaY,e]=size(cuttofflinesSigmaY);
[row_count_Tau,f]=size(cuttofflinesTau);
row_maximum=row_count_SigmaX;
matrix_reference=cuttofflinesSigmaX
if row_count_SigmaX<row_count_SigmaY
row_maximum=row_count_SigmaY;
matrix_reference=cuttofflinesSigmaY
end
if row_count_Tau>row_maximum
row_maximum=row_count_Tau;
matrix_reference=cuttofflinesTau
end
if row_count_SigmaX < row_maximum
ref=zeros(row_maximum-size(cuttofflinesSigmaX,1),2)
cuttofflinesSigmaX = vertcat(cuttofflinesSigmaX,ref)
end
if row_count_SigmaY<row_maximum
ref=zeros(row_maximum-size(cuttofflinesSigmaY,1),2)
cuttofflinesSigmaY = vertcat(cuttofflinesSigmaY,ref)
end
if row_count_Tau<row_maximum
ref=zeros(row_maximum-size(cuttofflinesTau,1),2)
cuttofflinesTau = vertcat(cuttofflinesTau,ref)
end
input_data_cutofflines=horzcat(cuttofflinesSigmaX,cuttofflinesSigmaY,cuttofflinesTau);
for i=1:3
if i==1
counter=0;
counter1=0;
else
counter=counter+3;
counter1=counter1+2;
end
x = input_data_rainflow(:,1+counter)
y = input_data_rainflow(:,2+counter)
z = input_data_rainflow(:,3+counter)
if sum(x)==0 && sum(y)==0 && sum(z)==0
plot_pos=1
else
plot_pos=1+counter1;
end
xx = input_data_cutofflines(:,1+counter1)
yy = input_data_cutofflines(:,2+counter1)
Size_cutofflines=[row_count_SigmaX;row_count_SigmaY;row_count_Tau]
if sum(xx)~=0 && sum(yy)~=0
for index = 1:Size_cutofflines(index_counter)
if (index==1)
line([xx(index) xx(index+1)],[yy(index) yy(index+1)],[default_value_z default_value_z],'Marker','.','LineStyle','-','LineWidth',5, 'Color',[1 1 0]);
else
line([xx(index-1) xx(index)],[yy(index-1) yy(index)],[default_value_z default_value_z],'Marker','.','LineStyle','-','LineWidth',5, 'Color',[1 0 0]);
end
if counterx==1
subplot(1,2,1)
hold on
end
if counterx==2
subplot(2,2,1)
hold on
end
if counterx==6
subplot(3,2,plot_pos)
hold on
end
end
end
index_counter=index_counter+1;
if sum(x)~=0 && sum(y)~=0 && sum(z)~=0
az = 0;
el = 90;
view(az, el);
hold on
view(0,90)
a = 12;
scatter3(x, y, z, a, z, 'filled')
hold on
view(0, 90)
[m,ind]=max(z);
colorbar
scatter3(x(ind), y(ind), z(ind),'*r');
grid on;
hold on;
end
end