Column size mismatch error using pdist2
3 ビュー (過去 30 日間)
古いコメントを表示
I'm trying to calculate the distance between two matrices of size 36x16, but I get the error message "Error using pdist2 (line 133) X and Y must have the same number of columns." In the workspace, it says that both variables are 36x16 double. What's happening?
Dist11o=pdist2(condition1,condition1odor2');
0 件のコメント
採用された回答
Walter Roberson
2016 年 4 月 3 日
Notice that after condition1odor2 you have a ' which is the transpose operator. You are asking it to transpose the 36 x 16 to 16 x 36
その他の回答 (1 件)
Roger Stafford
2016 年 4 月 3 日
You have taken the transpose of 'condition1oder2' which gives it 36 columns. That's a no-no for 'pdist2'.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Statistics and Machine Learning Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!