Problem 44635. Repetition of matrices

Created by Srishti Saha in Community

A is a bold matrix: [1 2 3; 4 5 6;7 8 9]

Given an integer 'n' , a matrix B exists such that has n copies of A in the row and column dimensions

example: for n=2; B= [A A; A A]

For such a matrix B return the sum of all elements multiplied by the size of B i.e.

C=sum (all elements of B) * size(B)
  • Kindly note you will have to make the matrix A yourself *

Solution Stats

68.52% Correct | 31.48% Incorrect
Last solution submitted on Feb 25, 2019