% Now defunct, use CleanUpClimateData


%D=load('../../9641C_201301_F52.max');
%
%z = [];
%for i = 1:size(D,1);
%if ~isempty(find(D(i,:) < 0));
%z = [z i];
%disp(i);
%end
%end
%Z = setdiff(1:size(D,1),z);
%E = D(Z,:);
%
set(0,'DefaultFigureWindowStyle','docked')

S = {'Jan','Feb','Mar','Apr','May','June','July','Aug','Sept','Oct','Nov','Dec'};

k = size(E,1);
K = k-118:k;
%K = k*118+1:k*118+118;
f = figure; hold on;

for j = 2:13;
title(S{j-1});
[v,xd,yd] = LeastSq(2,E(K,j)');

hb = plot(E(K,j),'.')
disp(['Slope is ', num2str(v(2))])
%x = 1:length(E(K,j)); y = v(1) + v(2)*x; % + v(3)*x.^2;
x = 1:length(E(K,j)); y = v(1) *exp( v(2)*x); % + v(3)*x.^2;

hr = plot(x,y,'r-','LineWidth',10)
pause
set(hb,'Visible','Off')
set(hr,'Visible','Off')
end

