I used the multiprod command to "multiple" two matrices:
A of size 1 x m x m x m
B of size m x 1 x k_1 x k_2 ... x k_m
In any case, I've used this command before without any problem. However, when I added an extra dimension to the matrix B it yields the following error:
Error using bsxfun Non-singleton dimensions of the two input arrays must match each other.
Any help would be much appreciated.

댓글 수: 4

James Tursa
James Tursa 2012년 5월 6일
What would be the dimension of the final result you are looking for?
Walter Roberson
Walter Roberson 2012년 5월 6일
There is no multiprod command in MATLAB. Perhaps you are referring to the MATLAB File Exchange contribution http://www.mathworks.com/matlabcentral/fileexchange/8773-multiple-matrix-multiplications-with-array-expansion-enabled ?
DB DB
DB DB 2012년 5월 6일
Thanks for the response everyone. Yes - I am referring to the multiprod command from the File Exchange. The resulting dimensions should be an m x m x k_1 x...x k_m. Thanks
James Tursa
James Tursa 2012년 5월 6일
Given the resulting dimension, I don't understand how the result is supposed to be formed. Suppose the result is C. Can you write an explicit expression for how you expect the m x m part of the result C to be formed? I.e., fill in the blanks for one of the m x m part results:
C(:,:,______) = A(_____) * B(______)
How do the initial 1 x m dimension of A and the initial m x 1 dimension of B figure into this?

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

답변 (0개)

카테고리

도움말 센터 및 File Exchange에서 Audio Processing Algorithm Design에 대해 자세히 알아보기

태그

질문:

2012년 5월 6일

Community Treasure Hunt

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

Start Hunting!

Translated by