Homework Questions? Ask a Tutor for Answers ASAP
Algebra: add two matrices) Write a method to add two matrices. The header of the method is as follows: public static double addMatrix(double a, double b) In order to be added, the two matrices must have the same dimensions and the same or compatible types of elements. Let c be the resulting matrix. Each element cij is aij + bij For example, for two matrices 3x3 a and b, c is a11 a12 a13 b11 b12 b13 a11+b11 a11+b12 a13+b13 a21 a22 a23 + b21 b22 b23 = a21+b21 a22+b22 a23+b23 a31 a32 a33 b31 b32 b33 a31+b31 a32+b32 a33+b33
Hello LogicPro, the sooner the better. I'm not sure if you can see the attached image. I received an error while trying to upload it.
how come the = matrix reads all zeroes? and the columns aren't perfectly aligned like in the sample output in the picture?
yes, my professor is very harsh on the grading. the output has to be identical to the one in the image. thank you logicpro
no problem. take your time please.