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

21 Ansichten (letzte 30 Tage)
maede mandi
maede mandi am 23 Sep. 2021
Kommentiert: Stephen23 am 27 Sep. 2021
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 Kommentare
Image Analyst
Image Analyst am 23 Sep. 2021
@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

Melden Sie sich an, um zu kommentieren.

Antworten (2)

Sulaymon Eshkabilov
Sulaymon Eshkabilov am 23 Sep. 2021
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 Kommentar
Image Analyst
Image Analyst am 26 Sep. 2021
Can she turn in your solution for her homework as if it were her own?

Melden Sie sich an, um zu kommentieren.


Jan
Jan am 23 Sep. 2021
Bearbeitet: Jan am 26 Sep. 2021
  2 Kommentare
maede mandi
maede mandi am 23 Sep. 2021
yeah i checked all of this forum but thanks
Jan
Jan am 26 Sep. 2021
You find code with loops for matrix and elementwise multiplications already. So what exactly is not clear yet?

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by