COMP 202 Lecture Notes - Grayscale, Convolution, Edge Detection
hwpark22 and 40159 others unlocked
100
COMP 202 Full Course Notes
Verified Note
100 documents
Document Summary
You must do this assignment individually and, unless otherwise specified, you must follow all the general instructions and regulations for assignments. Graders have the discretion to deduct up to 10% of the value of this assignment for deviations from the general instructions and regulations. These regulations are posted on the course website. Given two matrices (two dimensional (2d) arrays) with the same dimensions create a method that would perform piecewise multiplication. Please note that this is not the standard matrix multiplication, instead the result is a new matrix in which each element is the product of the respective elements of the other two matrices. The result for multiplying matrices a and b is c. Your method should have the header: public static double [][] multiply(int [][] a, double [][]b) Return null if the dimensions do not agree. In order to check for the first and second dimension use: a. length and a[0]. length. You can safely assume that the arrays are rectangular.