Not Yet Answered # How to find the product of two matrix?

VernonDozier 2,218 firstPerson 761 Hey, so I wanna ask how I need to create a method who will remove word if in that word is 2 same chars. Example: "Potato" in this word there is a 2 "o" chars so this word will need to be removed. "Forum" in this word there is no ...

Hi I'm having a problem implementing a mini shopping cart drop down in the header to show the user all the products they have in their shopping cart. It seems the only solution for this is Ajax, and I've looked all over and can't find anything that I could possibly ...

0

I want to find the product of two matrix using a function without using for loop?

Help is really appreciated.

Why don't you want to use a for-loop? That would be the easiest way. Any for-loop can be converted to a while or do-while loop, and vice versa.

You're looking at using nested loops, whatever type of loops those are. If you're multiplying an m x n matrix by an n x p matrix, you'll end up with an m x p matrix. The (a, b) element of the resulting n x p matrix will be calculated by multiplying the ath row of the m x n matrix by the bth column of the n x p matrix. You get that by setting up a sum variable, initializing it to 0, setting up a loop, going through it n times, each time multiplying two numbers and adding it to the sum. That's the innermost loop.

The outermost loop will be traversed m times (number of rows in the first matrix). The middle loop will be traversed p times (number of columns in the second matrix).

So you have a loop within a loop within a loop. I'd make them all for loops, but as mentioned, any for-loop can be turned into a while or do-while loop.

0

How to find the product of two matrix ?

The tittle should instead be :

How to use Google Properly

If you know how to multiply 2 matrices with for loops then you know

how to do with with other types of loop, provided you know about

the other loops.

This article has been dead for over six months. Start a new discussion instead.

Recommended Articles

Hi. Im using vb 2010. I want to dynamically add textboxes to my form by clicking on a button. I've google searched and so far this code worked:

```
Private Sub btn_addline_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_addline.Click
Dim txtB1 As New TextBox
Dim i
For i = ...
```