how do i multiply matrices in a sub-function using a for loop

Write a MATLAB function that performs matrix multiplication of two matrices sent in the input list. That is, write the nested FOR-END loops needed to perform multiplication. Don’t use the built in matrix operation (*). Your function should send a message if the two matrices entered violate the rules on matrix dimensions.

回答(1 个)

Wikipedia has a good explanation of Matrix multiplication.

1 个评论

it is not a matter of the actual multiplication of matrices. it is more that i do not know how to write the for loop asking the sub function to multiply the matrices while making sure that inner matrix dimensions agree.

请先登录,再进行评论。

类别

在 帮助中心 和 File Exchange 中查找有关 Loops and Conditional Statements 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by