% Transect_7.m; Ledwell; 9/7/05
% A look at peak heights and areas and -V areas

load Car_07.txt
A=Car_07(:,6);
H=Car_07(:,7);
V=Car_07(:,8);

k=find(~isnan(A) & ~isnan(H));
j=find(~isnan(V) & ~isnan(H));

figure(1); clf
plot(H(k),A(k),'o',H(j),V(j),'+')
[fit,par]=try_fit(H(k),A(k),1);
legend('Normal','V')
axis([0 25 0 18000])
xlabel('Peak Height')
ylabel('Area')

i=find(A<4000 | isnan(A) & ~isnan(H))
A(i)=polyval(par,H(i));
k=find(~isnan(A));
figure(2); clf
bar(A)
