function loading(k,N)


switch k
     case k == 1
        f = waitbar(0,'Please wait...');
        pause(.5)

    case k == floor((1/3)*N)
        waitbar(.33,f,'Loading your data, 1/3');
        pause(1)

    case k == floor((2/3)*N)
        waitbar(.67,f,'Processing your data, 2/3');
        pause(1)

    case k == floor((5/6)*N)
        waitbar(1,f,'Finishing');
        pause(1)
        close(f)

end
end