clear all

[date tmean tmin tmax rr]=textread('Textfile_mit_daily_data.txt','%11s %f %f %f %f');
Jahr = [1986; 1987; 1988; 1989; 1990; 1991; 1992; 1993; 1994; 1995; 1996; 1997; 1998; 1999; 2000; 2001; 2002; 2003; 2004; 2005; 2006; 2007; 2008];

for i=1:length(date);
    
[a(i) b(i) c(i)] = strread(char(date(i)),'%2d.%3s.%4d');

end

day=a';
month=b';
year=c';

month2(1:length(tmean))=NaN;
for i=1:length(tmean)
if month{i}=='Jan'
    month2(i)=1;
else
    month2(i)=NaN;
end
end
month2=month2';

number=[];
n=0;
for y=1986:2008
    n=n+1;
x=month2==1 & year==y & tmean<24;
number(n)=length(tmean(x));
end

P = number'
Y = [Jahr P]