-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathimportCoughData.m
49 lines (44 loc) · 1.92 KB
/
importCoughData.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
%% Import data from spreadsheet
% Script for importing data from the following spreadsheet:
%
% Workbook: /Users/apprentice/Documents/MATLAB/Triage/CoughFeatures_v9AnsReplacements.xlsx
% Worksheet: TrainData
%
% To extend the code for use with different selected data or a different
% spreadsheet, generate a function instead of a script.
% Auto-generated by MATLAB on 2015/07/31 01:45:08
%% Import the data
[~, ~, raw] = xlsread('/Users/apprentice/Documents/MATLAB/Triage/OdysseyData12_Cough_Harm.xlsx','TrainData');
raw = raw(2:end,2:26);
raw(cellfun(@(x) ~isempty(x) && isnumeric(x) && isnan(x),raw)) = {''};
cellVectors = raw(:,[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]);
%% Create table
coughData = table;
%% Allocate imported array to column variable names
coughData.self_vs_dr = cellVectors(:,1);
coughData.CurrentState = cellVectors(:,2);
coughData.Temperature = cellVectors(:,3);
coughData.InhaledIngest = cellVectors(:,4);
coughData.BreathingProblem = cellVectors(:,5);
coughData.CoughType = cellVectors(:,6);
coughData.CoughOnset = cellVectors(:,7);
coughData.Coughseverity = cellVectors(:,8);
coughData.PMHRespiratoryDis = cellVectors(:,9);
coughData.OtherSymptoms = cellVectors(:,10);
coughData.MedsRespiratory = cellVectors(:,11);
coughData.ChestPain = cellVectors(:,12);
coughData.WorstTime = cellVectors(:,13);
coughData.Coldfluseverity = cellVectors(:,14);
coughData.TreatmentTried = cellVectors(:,15);
coughData.Precipfactors = cellVectors(:,16);
coughData.Sputum = cellVectors(:,17);
coughData.BreathingRate = cellVectors(:,18);
coughData.Sorethroatseverity = cellVectors(:,19);
coughData.CoughSpasms = cellVectors(:,20);
coughData.Childprotection = cellVectors(:,21);
coughData.PMHCirculationDis = cellVectors(:,22);
coughData.LSTSmoker = cellVectors(:,23);
coughData.Swelling = cellVectors(:,24);
coughData.BlueComplexion = cellVectors(:,25);
%% Clear temporary variables
clearvars data raw cellVectors;