how to find the sum of matrix?
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
hello, I have a loop as results of K = 1:19, a matrix A (k), my question is how to find the sum (M )of all matrix for each value of k, ie: find M = sum(A (k))
0 comentarios
Respuestas (2)
Sachin Ganjare
el 17 de Oct. de 2012
If I understand your question correctly:
sum_of_all_matrices = sum(A)
2 comentarios
Sachin Ganjare
el 17 de Oct. de 2012
For Example:
a1 = [1 2 3]; a2 = [1 2 3]; a3 = [1 2 3]; a123 = [a1 a2 a3]; sum_out = sum(a123);
sum_out is sum of elements of matrix
Ver también
Categorías
Más información sobre Creating and Concatenating Matrices en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!