matrix product different sizes

3 Ansichten (letzte 30 Tage)
May Ho
May Ho am 1 Mär. 2021
Kommentiert: May Ho am 1 Mär. 2021
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?

Akzeptierte Antwort

Jan
Jan am 1 Mär. 2021
Bearbeitet: Jan am 1 Mär. 2021
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.
  1 Kommentar
May Ho
May Ho am 1 Mär. 2021
many thanks for the answer and suggestion!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by