Mercurial > hg > audio-degradation-toolbox
comparison demo_batchProcessing.m @ 15:953196fbfc94
moved writeCsvFile out to extra file
author | matthiasm |
---|---|
date | Thu, 24 Oct 2013 20:47:50 +0100 |
parents | c3a002ed2815 |
children | 641551f3c5e5 |
comparison
equal
deleted
inserted
replaced
14:c3a002ed2815 | 15:953196fbfc94 |
---|---|
49 'vinylRecording', ... | 49 'vinylRecording', ... |
50 'unit_addNoise', ... | 50 'unit_addNoise', ... |
51 'unit_addSound', ... | 51 'unit_addSound', ... |
52 'unit_applyAliasing', ... | 52 'unit_applyAliasing', ... |
53 'unit_applyClippingAlternative', ... | 53 'unit_applyClippingAlternative', ... |
54 'unit_applyHarmonicDistortion'}; | 54 'unit_applyHarmonicDistortion', ... |
55 'unit_applyMp3Compression', ... | |
56 'unit_applySpeedup'}; | |
55 nDegradation = length(degradationnames); | 57 nDegradation = length(degradationnames); |
56 | 58 |
57 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | 59 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
58 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | 60 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
59 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | 61 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
138 end | 140 end |
139 | 141 |
140 end | 142 end |
141 | 143 |
142 | 144 |
143 function writeCsvFile(filename, cols_numeric, remainingColsCell) | |
144 | |
145 numberOfAdditionalColumns = size(remainingColsCell,2); | |
146 | |
147 fid = fopen(filename,'w'); | |
148 for m=1:size(cols_numeric,1) | |
149 fprintf(fid,'%f',cols_numeric(m,1)); | |
150 for n=2:size(cols_numeric,2) | |
151 fprintf(fid,' %f',cols_numeric(m,n)); | |
152 end | |
153 for n=1:numberOfAdditionalColumns | |
154 fprintf(fid,' %s',remainingColsCell{m,n}); | |
155 end | |
156 fprintf(fid,'\n'); | |
157 end | |
158 fclose(fid); | |
159 | |
160 end | |
161 | |
162 |