multiplying certain parts of an 8x8 matrix
Mostrar comentarios más antiguos
How do I sum the 4 corners and 4 middle numbers of an 8x8 magic matrix?
1 comentario
Jan
el 29 de En. de 2011
You mention a mutliplication in the subject, but ask for a sum in the body.
Respuestas (2)
Walter Roberson
el 28 de En. de 2011
0 votos
sum( [M(1,1), M(1,end), M(end,1), M(end,end), reshape(M(floor(end/2):floor(end/2)+1,floor(end/2):floor(end/2)+1),1,[]) ])
Categorías
Más información sobre MATLAB en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!