

for i=1:12
   % SChange(i,size(SChange,2)+1)=zeros
    last=find(SChange(i,:)==0,1)-1
   % SChange(i,last)=nuFRET(1,visualStates(i)).A_bleached
    anf=1;

        
    for l=1:last
        
        SingleStates(i,l).startindex=anf;
        ende=SChange(i,l)
        SingleStates(i,l).counts(:,1:2)=nuFRET(1,visualStates(i)).counts(anf:ende,1:2);
        
        SingleStates(i,l).efficiency(:,1)=nuFRET(1,visualStates(i)).eff10(anf:ende);
        SingleStates(i,l).efficiency(:,2)=nuFRET(1,visualStates(i)).eff20(anf:ende);
        SingleStates(i,l).efficiency(:,3)=nuFRET(1,visualStates(i)).eff50(anf:ende);
        SingleStates(i,l).efficiency(:,4)=nuFRET(1,visualStates(i)).eff100(anf:ende);
        
        SingleStates(i,l).intensities(:,1:2)=nuFRET(1,visualStates(i)).ints10(anf:ende,1:2);
        SingleStates(i,l).intensities(:,3:4)=nuFRET(1,visualStates(i)).ints20(anf:ende,1:2);
        SingleStates(i,l).intensities(:,5:6)=nuFRET(1,visualStates(i)).ints50(anf:ende,1:2);
        SingleStates(i,l).intensities(:,7:8)=nuFRET(1,visualStates(i)).ints100(anf:ende,1:2);
        
        SingleStates(i,l).names=nuFRET(1,visualStates(i)).names
        
        anf=ende
    end
        
end
