|
Sorry thought it would be easier with words. Anyway, here goes...
The script starts by seperating data into days and then runs if certain conditions are fullfilled (I.E. if the data has a full days worth of info - stating at measurement 1 and finishing at measurement 8640)
for v=1:((length(Loc))-1);
if A((Loc(v,1)),2)==1
if A((Loc(v+1,1))-1,2)==8640
% seperating the database into smaller ones
for m=1:2975
for n=1:200
if A(m,39)==1
Cloudy(m,n)=A(m,n);
elseif A(m,39)==2
Rainy(m,n)=A(m,n);
elseif A(m,39)==3
Sunny(m,n)=A(m,n);
end
end
end
% removing the zeros
s=size(Day1);
Down=s(1,1);
Across=s(1,2);
for m=1:Down
for n=1:Across
if Day1(m,1)~= 0
Day1(m,n)=Day1(m,n);
else
Day1(m,n)=NaN;
end
end
end
Day1(any(isnan(Day1),2),:) = [];
%This is obviously repeated for every smaller database
.... % remaning of calculations to be done
end
end
I hope this makes things clearer...
|