%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%% prettySimgaViewer %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%    
%%%%%%%%%%%%%%%%%%%%%%%%%%%%% plotting buildups %%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
user.plotPrettySigma  = input('Plot the buildups ? (y/n): ','s');

deleteScreenMsg = [];

while strcmp(user.plotPrettySigma, 'y') == 0 && strcmp(user.plotPrettySigma, 'n') == 0
    user.plotPrettySigma  = input('Plot buildups ? (y/n): ','s');
end

while strcmp(user.plotPrettySigma, 'y') == 1
    
    user.sigmaDataj  = input('Enter the index number <sigmaData(j)> to plot: ');
    
    temp.B1 = 0;
    temp.B2 = 0;
    
    if sigmaData(user.sigmaDataj).unique == 1 && sigmaData(user.sigmaDataj).buildups.rawIzero ~= 999
        
        temp.B1 = user.sigmaDataj;
        
    elseif sigmaData(user.sigmaDataj).unique == 2
        
        if sigmaData(user.sigmaDataj).buildups.rawIzero ~= 999
            temp.B1 = user.sigmaDataj;
        end
        
        if sigmaData(sigmaData(user.sigmaDataj).indxji).buildups.rawIzero ~= 999
            temp.B2 = sigmaData(user.sigmaDataj).indxji;
        end
        
    end
    
    if temp.B1 ~= 0 || temp.B2 ~= 0
        figure(work.numberOfFig)
        work.numberOfFig = work.numberOfFig + 1;
        prettySigmaLetter
        
        if sigmaData(user.sigmaDataj).unique == 1
            fprintf('\nFor this index number there is no partner available\n')
        end
    else
        fprintf('\nFor this index number no buildup is available!\n\n')
    end
        
    user.plotPrettySigma  = input('Plot buildups ? (y/n): ','s');
    
    while strcmp(user.plotPrettySigma, 'y') == 0 && strcmp(user.plotPrettySigma, 'n') == 0
        user.plotPrettySigma  = input('Plot buildups ? (y/n): ','s');
    end
end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%