annotate _Old/Pitch Track Data/readInCSV.m @ 3:475bddaf580c tip

Add report and Presentation
author Dave Moffat <d.j.moffat@qmul.ac.uk>
date Wed, 25 Feb 2015 16:07:05 +0000
parents 26494c0d9ffd
children
rev   line source
d@0 1 function output = readInCSV(fileName)
d@0 2
d@0 3
d@0 4
d@0 5
d@0 6 inputData = textscan(fopen(fileName),'%s');
d@0 7
d@0 8 output = [];
d@0 9 row = 1;
d@0 10 temprow = [];
d@0 11 for i = 1:length(inputData{1})
d@0 12 if(~strcmp(inputData{1}(i),','))
d@0 13 if(str2num(inputData{1}(i)) == row)
d@0 14 output = cat(1,output,temprow);
d@0 15 temprow = [];
d@0 16 row = row + 1;
d@0 17 else
d@0 18 temprow = cat(2,temprow, inputData{1}(i))
d@0 19 end
d@0 20 end
d@0 21 end
d@0 22
d@0 23
d@0 24 end