MATLAB: How to sum multiple matrices

matrixsum

Hello, I 'm new in matlab and I need help please. I have 3 matrix A,B et C. the size of each matrix is 1000*1121. I want to sum the 3 matrix (A+B+C) and save the result in a matrix D (for example : D[1,1]= A[1,1]+B[1,1]+C[1,1]). Please, how can I implement this problem in matlab? and thanks in advance

Best Answer

Product of matrices is "*". Therefore, if they're the same size, D= A*B*C; If instead you want elementwise product, D = A.*B.*C; But all of this is very basic, and explained in the documentation.