Mercurial > hg > dcase2013_sc_rnh
annotate get_filenames.m @ 2:def2b3fa1450 tip master
corrected README
author | Gerard Roma <gerard.roma@upf.edu> |
---|---|
date | Mon, 04 Nov 2013 10:46:05 +0000 |
parents | 96b1b8697b60 |
children |
rev | line source |
---|---|
gerard@1 | 1 % Copyright 2013 MUSIC TECHNOLOGY GROUP, UNIVERSITAT POMPEU FABRA |
gerard@1 | 2 % |
gerard@1 | 3 % Written by Gerard Roma <gerard.roma@upf.edu> |
gerard@1 | 4 % |
gerard@1 | 5 % This program is free software: you can redistribute it and/or modify |
gerard@1 | 6 % it under the terms of the GNU Affero General Public License as published by |
gerard@1 | 7 % the Free Software Foundation, either version 3 of the License, or |
gerard@1 | 8 % (at your option) any later version. |
gerard@1 | 9 % |
gerard@1 | 10 % This program is distributed in the hope that it will be useful, |
gerard@1 | 11 % but WITHOUT ANY WARRANTY; without even the implied warranty of |
gerard@1 | 12 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
gerard@1 | 13 % GNU Affero General Public License for more details. |
gerard@1 | 14 % |
gerard@1 | 15 % You should have received a copy of the GNU Affero General Public License |
gerard@1 | 16 % along with this program. If not, see <http://www.gnu.org/licenses/>. |
gerard@1 | 17 |
gerard@1 | 18 function [x,y] = get_filenames(dir) |
gerard@1 | 19 classes = {'bus' 'busystreet' 'office' 'openairmarket' 'park' 'quietstreet' 'restaurant' 'supermarket' 'tube' 'tubestation'}; |
gerard@1 | 20 |
gerard@1 | 21 |
gerard@1 | 22 names = []; |
gerard@1 | 23 labels = []; |
gerard@1 | 24 |
gerard@1 | 25 for i=1:length(classes) |
gerard@1 | 26 for j = 1:10 |
gerard@1 | 27 suffix=sprintf('%02d.wav',j); |
gerard@1 | 28 name = strcat(dir,classes(i),suffix); |
gerard@1 | 29 names = [names;name]; |
gerard@1 | 30 labels = [labels; i]; |
gerard@1 | 31 end |
gerard@1 | 32 end |
gerard@1 | 33 x = names; |
gerard@1 | 34 y = labels; |
gerard@1 | 35 end |
gerard@1 | 36 |
gerard@1 | 37 |