필터 지우기
필터 지우기

How to resolve the Error using ==> mtimes Inner matrix dimensions must agree?

조회 수: 1 (최근 30일)
Anurag Pujari
Anurag Pujari 2013년 3월 30일
% Magnitude spectrum computation (as column vectors)
MAG = abs( fft(frames,nfft,1) );
% Triangular filterbank with uniformly spaced filters on mel scale
H = trifbank( M, K, R, fs, hz2mel, mel2hz ); % size of H is M x K
% Filterbank application to unique part of the magnitude spectrum
FBE = H*MAG(1:K,:); % FBE( FBE<1.0 ) = 1.0; % apply mel floor
Error using ==> mtimes
Inner matrix dimensions must agree.
Error in ==> new at 41
FBE = H*MAG(1:K,:); % FBE( FBE<1.0 ) = 1.0; % apply mel floor
  댓글 수: 3
Anurag Pujari
Anurag Pujari 2013년 3월 31일
It shows the following: 23 2049
256 1534
M = 20 K =129
Walter Roberson
Walter Roberson 2013년 3월 31일
The code H*MAG(1:K,:) is assuming that the second dimension of H should be length K, but clearly it is not.
trifbank is not a built-in MATLAB routine. Did you download one of the implementations from the File Exchange? If so then you are going to have to debug why it is not returning matrices of width K.

댓글을 달려면 로그인하십시오.

답변 (0개)

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by