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 1×12 while that of FFTFreqMat is of 1×501. 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; endendW = 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 elementwisemultiplication, use '.*'.Error in MFCCProcessor (line 66)ms = MelFrequencyVector*abs(FreqFFTMatrix(1:y2)).^2;Error in phase1 (line 19) MFCC = MFCCProcessor(y,Fs,i+2);
Best Answer