Hi Iam trying to train a dataset on a short term basis of 1 Sample with 3 Features so I expect 3 row matrix.
The problem is i get an empty matrix.
Do you know where the problem is ? example would be helpfull
function kNN_model_add_class(modelName, className, classPath, ...
stWin, stStep)
if ~exist(classPath,'dir')
error('Audio sample path is not valid!');
else
classPath = [classPath filesep];
end
fp = fopen(modelName, 'r');
if fp>0
load(modelName);
end
D = dir([classPath '*.wav']);
F = [];
for (i=1:length(D))
curFileName = [classPath D(i).name];
FileNamesTemp{i} = curFileName;
Features = stFeatureExtraction(curFileName, 44100, stWin, stStep)
longFeatures = mean(Features,2);
F = [F longFeatures];
end
if ~exist(modelName, 'file')
ClassNames{1} = className;
Features{1} = F;
FileNames{1} = FileNamesTemp;
save(modelName, 'ClassNames', 'Features', ...
'stWin', 'stStep','FileNames');
else
load(modelName);
ClassNames{end+1} = className;
Features{end+1} = F;
FileNames{end+1} = FileNamesTemp;
save(modelName, 'ClassNames', 'Features', ...
'stWin', 'stStep','FileNames');
end