% mydata.m
% An M-file that reads in your data set, generates a pdf, compares
% it to the gaussian pdf using the chi-square goodness of fit test
% calls m-files pdfdat.m
%               datstats.m

clear
%clf
dataname =input('What is the name of your dataset (without extension)? ','s');
if ~strcmp(computer,'PCWIN')
  addpath('/h/ochome2/orzech/oc3150/Data');
end
tdataset = [dataname '.data'];
eval(['load ' tdataset])
  data = eval(dataname);
  data=data';
  data=data(:);
  nm = length(data);
  nn = 1;
  meandata=mean(data);
  stddata=std(data);
  vardata=stddata * stddata;
  S0=sprintf('\n');
  disp(S0)
  disp(['The mean of your data is ',num2str(meandata)])
  disp(['The standard deviation is ',num2str(stddata)])
  disp(['The variance is ',num2str(vardata)])
  disp(S0)
  pdfdat
  datstats

  name = input('Type your name so it can be printed on the plot. ','s');
  string = ['number of means = ' num2str(nm) ', mean sample size = '  num2str(nn)];

  pltpdfdat
