Code covered by the BSD License  

Highlights from
Introduction to Statistics Toolbox - July 2007 Webinar Files

image thumbnail

Introduction to Statistics Toolbox - July 2007 Webinar Files

by

 

17 Jul 2007 (Updated )

Presentation and demo files for the "Introduction to Statistics Toolbox™" Webinar (July 12, 2007)

loadData
function cars = loadData

%loadData  Load all files in the directory and store into a single dataset
%
%   loadData()

% Copyright 2007 The MathWorks, Inc.

% Prepare files
dataFiles = dir('*.xls');
dataFiles = {dataFiles.name};

for iFile = 1:length(dataFiles)
  fprintf('Reading in %d of %d\n', iFile, length(dataFiles));
  cars{iFile} = createCarDataset(dataFiles{iFile});
  
  % fix ordinal for vertcat
  cars{iFile}.yr         = nominal(cars{iFile}.yr);
  cars{iFile}.valves_cyl = nominal(cars{iFile}.valves_cyl);
end

cars = vertcat(cars{:});

cars.yr         = ordinal(cars.yr);
cars.valves_cyl = ordinal(cars.valves_cyl);

disp('Done');

Contact us