MATLAB: Column size mismatch error using pdist2

column mismatchpdist2

I'm trying to calculate the distance between two matrices of size 36×16, 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 36×16 double. What's happening?
Dist11o=pdist2(condition1,condition1odor2');

Best Answer

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
Related Question