two 3*3 matrix multiplication using for loop in matlab.

조회 수: 16 (최근 30일)
maede mandi
maede mandi 2021년 9월 23일
댓글: Stephen23 2021년 9월 27일
hi ; i need the multiplication of two 3*3 matrix ([3,3]*[3,3]) using for loops. thanks.actually i am going to do matlab matrix multiplication code.We will take two matrices as an input from the user and perform matrices multiplication in matlab.This can be used for array multiplication in matlab.
  댓글 수: 4
Image Analyst
Image Analyst 2021년 9월 23일
@maede mandi, then I assume it must be your homework, correct? If so, we're not able to provide the full solution to you or else you'd get into trouble. In the meantime, try input() to ask the user to input matrices

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

답변 (2개)

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2021년 9월 23일
Maybe you want to perform elementwise mutliplication of two matrices, if so, :
A.*B
FOR or WHILE loop are not advised to use for matrix multiplication.
for ii = 1:3
for jj = 1:3
AB(ii,jj)= A(ii,jj)*B(ii,jj);
end
end
  댓글 수: 1
Image Analyst
Image Analyst 2021년 9월 26일
Can she turn in your solution for her homework as if it were her own?

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


Jan
Jan 2021년 9월 23일
편집: Jan 2021년 9월 26일
  댓글 수: 2
maede mandi
maede mandi 2021년 9월 23일
yeah i checked all of this forum but thanks
Jan
Jan 2021년 9월 26일
You find code with loops for matrix and elementwise multiplications already. So what exactly is not clear yet?

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

카테고리

Help CenterFile 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