You are given a matrix of size m x n, where each cell contains an integer value. Your task is to implement a function to calculate the sum of all elements in the matrix.
matrix = [ [1, 2, 3], [4, 5, 6], [7, 8, 9] ]
45
Last updated 1 year ago