【发布时间】:2015-11-09 15:21:55
【问题描述】:
我创建如下的 simulink 块:
在解释的 MATLAB 函数中,我使用此代码。
function y1 = fcn(signal)
%% variable declaration
Fm = 100;%length of Frames excursion
framelnc = 100;%length of Frames excursion
Fn = 256;%length of Frames sampling frequency 12.500kHz, frame length 020.5ms
fs = 8000;
x=signal;
%% Preprocessing: Noise Removal
IS= 0.25; % initial silence (noise only)
output=denoise(x,fs,IS);
y = output;
%% Extraction of LFCC Features
feat = lfcc(y,fs);
%% Extract VQ CODE
k=16; % number of centroids required
code1 = vqext(feat, k);
test = mean2(code1);
%% Emotions Recognition
load ('train.mat')
Class = knnclassify(test , feature, type);
if (Class == 1)
%% Display identification results
msg=1;
end
if (Class == 2)
%% Display identification results
msg=2;
end
y1 = msg;
我在单独的 matlab 文件中定义了这些 denoise,lfcc,vqext,knnclassify 函数。但我收到如下错误。
我该如何解决这个问题?
【问题讨论】: