
for i=1:length(CSingleStatesPrev)
%monolengths(i,1)=length(CSingleStates(1,i).monocounts);
singlelength(i,1)=length(CSingleStatesPrev(1,i).counts);
end


for i=1:length(CSingleStatesPrev)
%monolengths(i,1)=length(CSingleStates(1,i).monocounts);
singlenames(i,:)=CSingleStatesPrev(1,i).names;
end

for i=1:length(NPtester)
npTest(i,1)=size(NPtester(i,1).singleNPsteps20_21i121,1)
npTest(i,2)=size(NPtester(i,1).singleNPsteps2_1002001,1)
npTest(i,3)=size(NPtester(i,1).singleNPsteps2_1012000,1)
npTest(i,4)=size(NPtester(i,1).singleNPsteps2_101Full,1)
npTest(i,5)=size(NPtester(i,1).singleNPsteps2_101Minus4,1)
npTest(i,6)=size(NPtester(i,1).singleNPsteps2i101_101,1)
npTest(i,7)=size(NPtester(i,1).singleNPsteps440i2420_2500,1)
npTest(i,8)=size(NPtester(i,1).singleNPsteps7i108_500,1)

end

TWvar()
for i=1:length(NPtester)
    NPvari2_101(i,1)=sqrt(var(NPtester(i,1).singleNPsteps2i101_101));
    NPvari2_101(i,2)=mean(NPtester(i,1).singleNPsteps2i101_101);
    NPvari2_101tw500(i,1)=sqrt(var(NPtester(i,1).singleNPsteps7i108_500));
    NPvari2_101tw500(i,2)=mean(NPtester(i,1).singleNPsteps7i108_500);

    %   TWvari(i,1)=sqrt(var(NPtester(i,1).singleNPsteps20_21i121))
%     TWvari(i,2)=mean(NPtester(i,1).singleNPsteps20_21i121)
end
    
subplot(5,1,1)    
DualPhotonPlot(uFRET(1,31).counts(2555:end,1:2))

subplot(5,1,2)
DualPhotonPlot(CSingleStates(1,31).counts)

subplot(5,1,3)
DualPhotonPlot(CSingleStates(1,31).monocounts)

subplot(5,1,4)
plot(CSingleStates(1,31).int20)

subplot(5,1,5)
plot(CSingleStates(1,31).eff10)


dur=length(CSingleStates(1,i+k).eff100)


k=0
for s=1:3
    figure;
        for i=1:30
    dur=length(CSingleStates(1,i+k).eff100)
    subplot(10,3,i)
    plot(CSingleStates(1,i+k).eff100)
    set(gca,'xtick',[dur/2:dur/2:dur],'ytick',[0:0.2:1], 'YColor','b','XTickLabel',{'num2str(dur/2)','num2str(dur)'});
    title([num2str(k+i) ' part ' CSingleStates(1,i).part])
    xyPos=get(gca,'Position');
    xyPos(1,1:2)
    xyPos(1,3:4)=[0.29 0.1]
    set(gca, 'Position',xyPos,...
           'XLim',[1,dur]);
        end
    k=k+30;