horzcat CAT arguments dimensions are not consistent.
古いコメントを表示
I have problem with my code.
??? Error using ==> horzcat CAT arguments dimensions are not consistent.
Error in ==> rozpoznawanie_dzwiekowPerc at 209 mfcc_kaszel = [mfcc_kaszel; [c sp_bw sp_centroid sp_rolloff shortte zerocr]];
1 件のコメント
AJ von Alt
2014 年 1 月 21 日
Can you post your code? Make sure that each vector your are trying to concatenate has the same number of rows. Errors like this usually happen when you try to concatenate a row vector with a column vector.
採用された回答
その他の回答 (1 件)
Amit
2014 年 1 月 21 日
The problem is in
[mfcc_kaszel; [c sp_bw sp_centroid sp_rolloff shortte zerocr]]
[c sp_bw sp_centroid sp_rolloff shortte zerocr] is a 1x3 matrix. Unless mfcc_kaszel is nx3 matrix this operation in not allowed.
what is the dimension of mfcc_kaszel?
3 件のコメント
Amit
2014 年 1 月 21 日
Once you have run this code and got the error, do the following and post your result.
whos mfcc_kaszel c sp_bw sp_centroid sp_rolloff shortte zerocr
Monika
2014 年 1 月 21 日
Amit
2014 年 1 月 22 日
The problem is that the dimensions of sp_bw, sp_centroid and sp_rolloff are 1x82 while the same for c, shortte and zerocr are 82xn. mfcc_kaszel is a null vector so it doesn't matter.
I think you need to change the code like this:
mfcc_kaszel = [mfcc_kaszel; [c sp_bw' sp_centroid' sp_rolloff' shortte zerocr]];
which will work.
カテゴリ
ヘルプ センター および File Exchange で Creating and Concatenating Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!