matrix product different sizes

I have three matrices, A of size 46-by-46 and B of size 36-by-36, C of size 36-by-10. I need to compute A*B*C
How would I do it ? Doing ans=A*B*C, can't work out and hint wrong
Can I use the if sentence to solve this problem?

 采纳的回答

Jan
Jan 2021-3-1
编辑:Jan 2021-3-1

0 个投票

The multiplication of a 36-by-36 and a 36-by-10 matrix is mathematically defined and creates a 36-by-10 matrix. But you cannot multiply this with a 46-by-46 matrix.
The readers cannot guess, what you want as result of this, so there is no chance to know, if an if statement would be useful.
What do you expect as result?
By the way, please do not explain the error message in other words, but post a complete copy of the original message, when you discuss in the forum.

更多回答(0 个)

类别

在 帮助中心 和 File Exchange 中查找有关 Logical 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by