Column size mismatch error using pdist2
显示 更早的评论
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');
采纳的回答
更多回答(1 个)
Roger Stafford
2016-4-3
1 个投票
You have taken the transpose of 'condition1oder2' which gives it 36 columns. That's a no-no for 'pdist2'.
类别
在 帮助中心 和 File Exchange 中查找有关 Simulink 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!