How to Find average value for every 10 sets of a matrix
조회 수: 2 (최근 30일)
이전 댓글 표시
I have a one dimensional array A of 1000 elements.
How do I calculate the mean of elements for the first 10 sets ,then the second sets, and third sets so on until 1000
댓글 수: 0
채택된 답변
Mischa Kim
2021년 1월 15일
Hi Magdy, you could use something like:
x = 1:1:12; % this would be your matrix A
y = reshape(x,3,4)
m = mean(y,1)
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!