function y=b10b26(x)
%input a base10 integer
%output a string of lower case letters with no space

if x~=floor(x)
	error('Parameter of function is not an integer')
end
i=2;
z(1)=floor(x/26);
r(1)=rem(x,26);
k=z(1);
while k~=0
   z(i)=floor(z(i-1)/26);
   r(i)=rem(z(i-1),26);
   k=z(i);
   i=i+1;
end
n=length(r);
for i=1:n
    switch r(i)
        case 0
            s='a';
        case 1
            s='b';
        case 2
            s='c';
        case 3
            s='d';
        case 4
            s='e';
        case 5
            s='f';
        case 6
            s='g';
        case 7
            s='h';
        case 8
            s='i';
        case 9
            s='j';
        case 10
            s='k';
        case 11
            s='l';
        case 12
            s='m';
        case 13
            s='n';
        case 14
            s='o';
        case 15
            s='p';
        case 16
            s='q';
        case 17
            s='r';
        case 18
            s='s';
        case 19
            s='t';
        case 20
            s='u';
        case 21
            s='v';
        case 22
            s='w';
        case 23
            s='x';
        case 24
            s='y';
        case 25
            s='z';
        otherwise
               error('Unexpected value');
    end
    if i~=1
        y=strcat(s,y);
    else
        y=s;
    end
end
