Can any one please tell me how I can remove this error in MFCC?
Mostrar comentarios más antiguos
Hi there,
I am trying to run the code but not getting the correct plot with the melfilter. And that's why I tried oopp.m to get the curve. But the outout of that oopp.m is 1x12 while that of FFTFreqMat is of 1x501. what should I need to do? Because I want this step for my further code to run.
%============================================================================================
oopp.m
%function [f] = oopp(f2)
f=zeros(1,501);
f1=0;f2=12500;
n=10;
fm1=2595*log10(1+f1/700);
fm2=2595*log10(1+f2/700);
fmw=(fm2-fm1)/(n+1);
fm=fm1:fmw:fm2;
f=700*(exp(fm/1125)-1)
%=========================================================
MFCCProcessor.m
N = 256;
M = 100;
Frames = 1 + floor((length(y) - N)/double(M));
V = zeros(N, Frames);
for n=1:Frames
k = 100*(n-1) + 1;
for j=1:N
V(j,n) = y(k);
k = k + 1;
end
end
W = hamming(N);
WresultMatrix = diag(W)*V;
FreqFFTMatrix = fft(WresultMatrix);
[MelFrequencyVector] = oopp(Fs);
y2 = 1 + floor(N/2);
ms = MelFrequencyVector*abs(FreqFFTMatrix(1:y2)).^2;
%=============================================================
at this point it throws error=>
Error using *
Incorrect dimensions for matrix multiplication. Check that the number of columns in the first matrix matches the number of rows in the second matrix. To perform elementwise
multiplication, use '.*'.
Error in MFCCProcessor (line 66)
ms = MelFrequencyVector*abs(FreqFFTMatrix(1:y2)).^2;
Error in phase1 (line 19)
MFCC = MFCCProcessor(y,Fs,i+2);
4 comentarios
Walter Roberson
el 29 de Nov. de 2018
Undefined function or variable 'y'.
Gaurav Sharma
el 29 de Nov. de 2018
Walter Roberson
el 29 de Nov. de 2018
That would generate an error about an attempt to call script MFCCProcessor as a function.
Gaurav Sharma
el 29 de Nov. de 2018
Editada: Gaurav Sharma
el 29 de Nov. de 2018
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Spectral Measurements en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!