view _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
line wrap: on
line source
function output = readInCSV(fileName)




inputData = textscan(fopen(fileName),'%s');

output = [];
row = 1;
temprow = [];
for i = 1:length(inputData{1})    
    if(~strcmp(inputData{1}(i),','))
        if(str2num(inputData{1}(i)) == row)
            output = cat(1,output,temprow);
            temprow = [];
            row = row + 1;
        else
            temprow = cat(2,temprow, inputData{1}(i))
        end
    end
end


end