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)

createCarDataset(fileName)
function cars = createCarDataset(fileName)

%createCarDataset Creates a dataset array from a file
%
%   data = createCarDataset(filename)
%       It creates a dataset array and converts the appropriate variables
%       to categorical arrays.

% Copyright 2007 The MathWorks, Inc.

cars = dataset('XLSFile', fileName);

% Convert to categorical
cars.yr         = ordinal(cars.yr);
cars.mfrName    = nominal(cars.mfrName);
cars.carline    = nominal(cars.carline);
cars.car_truck  = nominal(cars.car_truck);
cars.police     = nominal(cars.police);
cars.trns       = nominal(cars.trns);
cars.drv        = nominal(cars.drv);
cars.a_c        = nominal(cars.a_c);
cars.prp        = nominal(cars.prp);
cars.fuel       = nominal(cars.fuel);
cars.C_H        = nominal(cars.C_H);
cars.valves_cyl = ordinal(cars.valves_cyl);

Contact us