answersLogoWhite

0

For the resulting matrix, just add the corresponding elements from each of the matrices you add. Use coordinates, like "i" and "j", to loop through all the elements in the matrices. For example (for Java; code is similar in C):

for (i = 0; i <= height - 1; i++)
for (j = 0; j<= weidht - 1; j++)
matrix_c[i][j] = matrix_a[i][j] + matrix_b[i][j]


User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

Types of flow chart?

Flow chart: - A flow chart is a symbolic representation of any process. Each step in the process is represented by a different symbol with a short description of the process. The flow chart symbols are linked together with arrows showing the process flow direction.There ate two types of flow charts1. Low level flow chart2. High level flow chart


Draw a flow chart to find HCF of two given numbers?

First you will need to pick out the two numbers. Then you can use your textbook and the instructions in order to draw out the flow chart.


How do you develop a JAVA program that computes matrices?

Matrices can't be "computed" as such; only operations like multiplication, transpose, addition, subtraction, etc., can be done. What can be computed are determinants. If you want to write a program that does operations such as these on matrices, I suggest using a two-dimensional array to store the values in the matrices, and use for-loops to iterate through the values.


Write an algorithm for multiplication of two sparse matrices?

how to multiply two sparse matrices


A diagram that represents the outcomes of two or more events?

flow chart


How do you draw a flow chart for determining if the two numbers are equal or not?

using OR ().


Can you add a 1x3 matrix to a 3x2 matrix?

No, you cannot add a 1x3 matrix to a 3x2 matrix because the two matrices have different dimensions. For matrix addition to be valid, both matrices must have the same dimensions. In this case, a 1x3 matrix has one row and three columns, while a 3x2 matrix has three rows and two columns, making them incompatible for addition.


Flow chart for sum of two numbers in c?

z = x + y


These matrices represent the coordinates of two figures in the plane. Is the product of these matrices defined Answer yes or no?

no


Write flowchart searching algorithm?

flow chart to swap two number


Why does the flow chart split into two paths after Megan sets up her stand?

bh


How do you combine two matric result?

To combine two matrices, ensure they have compatible dimensions. If you're performing addition or subtraction, both matrices must have the same dimensions. For multiplication, the number of columns in the first matrix must equal the number of rows in the second matrix. After confirming compatibility, apply the appropriate operation element-wise for addition/subtraction, or use the matrix multiplication rules for multiplication.