function[output] = kodovani(input)
    if input <= 0 | input >= 10 | rem(input, 1) ~= 0 
        error("spatny input")
    else
        switch input
            case 1
                output = 'zakladni skola';
            case {2, 3}
                output = 'stredni skola';
            case {4, 5, 6}
                output = 'bakalar';
            case 7
                output = 'vysoka skola';
            case 8 
                output = 'doktorat';
            case 9 
                output = 'vyssi vzdelani';
        end
    end
end