%  ====================================================
%  expt.m -- Statistical analysis of experimental data.
%
%  Written By : Mark Austin                   July 1997
%  ====================================================

% Store experimental results in array

  load expt.dat

% Generate bar plot of experimental results

  bar(expt(:,1), expt(:,2),'b')
  xlabel('Day of Expt');
  ylabel('Pollen Count');

% Compute terms from experimental results.

  [xm, xd] = stat(expt(:,2))

% Create and display mean value of pollen count

  mean_minus = xm(1,1) - xd(1,1);
  mean_plus  = xm(1,1) + xd(1,1);

  data = [  1, xm(1,1), mean_minus, mean_plus;
           15, xm(1,1), mean_minus, mean_plus ];

  hold;
  plot (data(:,1), data(:,2), 'b');
  plot (data(:,1), data(:,3), 'b:');
  plot (data(:,1), data(:,4), 'b:');

  text(1,   xm(1,1) + 10,'Mean Pollen Count');
  text(1,mean_minus + 10,'Mean - Std');
  text(1, mean_plus + 10,'Mean + Std');
