Calculate mean value of every element of a .mat file
조회 수: 8 (최근 30일)
이전 댓글 표시
I have a .mat file which contains 300 matrixes all of which have the same dimensions of 256x320. I want to calculate the mean value of each matrix, with a for circle maybe, thus obtaining 300 vectors. Then I want to put all those vectors in a single matrix. Thanks in advance.
댓글 수: 2
채택된 답변
추가 답변 (1개)
Ilya Dikariev
2022년 5월 20일
singleMatrix=zeros(size(oldMatrix));
for i=1:length(singleMatrix)
singlematrix=mean(oldMatrix);
end
that should work if you want your end matrix in a single row
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!