필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

How to calculate the mean values in this case?

조회 수: 1 (최근 30일)
Leon
Leon 2018년 3월 14일
마감: MATLAB Answer Bot 2021년 8월 20일
I have two matrices: both of them have sizes of 200x100x50. The third elements (50) are time. In Matrix One, the time starts from Time1 to Time2, and in Matrix Two, the time starts from Time2 to Time3. How do I get the average values of the time chunk from Time1 all the way to Time3?
Instead of creating a loop, is there a more efficient way of getting this done. I have a bunch of such matrix pairs.
Many thanks!

답변 (1개)

KSSV
KSSV 2018년 3월 14일
Read about mean it gives you option of specifying the dimension to calculate the mean. If you think you need to arrange your matrix in some order..use reshape. Just using reshape and mean is sufficient. You need not to go for loop.

태그

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by