Sum all the Channels in matrix
조회 수: 2 (최근 30일)
이전 댓글 표시
Hello everyone,
Let say I have a matrix M of 100 x 100 x 5. How can I sum all the channels of M and get one matrix R of size 100 x 100 only. I want to do it without loops.
댓글 수: 0
채택된 답변
추가 답변 (1개)
Wayne King
2012년 9월 16일
편집: Wayne King
2012년 9월 16일
M = randn(100,100,5);
R = sum(M,3);
Did you read the help for sum?
참고 항목
카테고리
Help Center 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!