I've never done string comparison before, but I noticed that "January" has seven characters while "February" has eight. It looks like they're being compared as character arrays and the comparison is failing because they're incommensurate.
The following workaround ran succesfully for me:
if length(mes)==7 && mes == 'january'
a = 1;
endif
if length(mes)==8 && mes == 'february'
b = 2;
endif
if length(mes)==5 && mes == 'march'
c = 3;
endif
Also, why not reduce the number of comparisons with elseif?
if length(mes)==7 && mes == 'january'
a = 1;
elseif length(mes)==8 && mes == 'february'
b = 2;
elseif length(mes)==5 && mes == 'march'
c = 3;
end