001
002
003
004
005
006
007
008
009
010
011
012
013
014
015
016
017
018
019
020
021
022
023
024
025
026
027
028
029
030
031 democc_demow2=figure('Name','The rainflow & peak-trough cycle count','NumberTitle','off','Position',[0 300 500 350]);
032 democc_demow1=figure('Name','Demonstration Window 1','NumberTitle','off','Position',[0 0 1000 300]);
033 clf;
034 democc_time=1:length(proc);
035 if min(size(proc))==2,
036 proc=proc(:,2);
037 end
038 democc_y=[democc_time(:) proc(:)];
039 democc_L=democc_y(:,2); democc_n=length(democc_L); clc, clf, subplot(1,1,1)
040
041 democc_ccrfc=[]; democc_ccmM=[]; democc_tp=dat2tp(democc_y);
042
043 set(gca,'box','on'), xlabel('time'), ylabel('load')
044 democc_k=democc_markmax(democc_y,democc_tp,1,0);
045 democc_F = uicontrol('style','push','units','normal','pos',[.92 .93 .03 .06], ...
046 'string','+1','call','democc_k=democc_k+2; democc_k=democc_markmax(democc_y,democc_tp,democc_k,-2);');
047 democc_FF= uicontrol('style','push','units','normal','pos',[.96 .93 .03 .06], ...
048 'string','+5','call','democc_k=democc_k+10; democc_k=democc_markmax(democc_y,democc_tp,democc_k,-10);');
049 democc_REW = uicontrol('style','push','units','normal','pos',[.92 .86 .03 .06], ...
050 'string','-1','call','democc_k=democc_k-2; democc_k=democc_markmax(democc_y,democc_tp,democc_k,2);');
051 democc_REW = uicontrol('style','push','units','normal','pos',[.96 .86 .03 .06], ...
052 'string','-5','call','democc_k=democc_k-10; democc_k=democc_markmax(democc_y,democc_tp,democc_k,10);');
053 democc_RFC = uicontrol('style','push','units','normal','pos',[.92 .79 .07 .06], ...
054 'string','RFC','call','democc_ccrfc=democc_rfcdef(democc_y,democc_tp,democc_k,democc_ccrfc); democc_plotmat(democc_demow2,democc_ccrfc,democc_ccmM)');
055 democc_MM = uicontrol('style','push','units','normal','pos',[.92 .72 .07 .06], ...
056 'string','mM','call','democc_ccmM=democc_mmdef(democc_y,democc_tp,democc_k,democc_ccmM); democc_plotmat(democc_demow2,democc_ccrfc,democc_ccmM)');
057 democc_TP = uicontrol('style','push','units','normal','pos',[.92 .65 .07 .06], ...
058 'string','TP','call','democc_tpdef(democc_y)');
059 democc_TP = uicontrol('style','push','units','normal','pos',[.92 .58 .07 .06], ...
060 'string','Redraw','call','democc_k=democc_markmax(democc_y,democc_tp,democc_k,0);');
061 democc_TP = uicontrol('style','push','units','normal','pos',[.92 .51 .07 .06], ...
062 'string','END','call','delete(democc_demow1), delete(democc_demow2), clear democc_*');
063
064
065