필터 지우기
필터 지우기

Find area under curve of every n rows

조회 수: 1 (최근 30일)
David du Preez
David du Preez 2017년 5월 18일
댓글: KSSV 2017년 5월 18일
Hi. I have a 648 x 14 matrix. I want to calculated the area under the curve of every 24 values created by the values in column 5. I can do this within a loop but I want to perform the same function on different matrices with a varying number of rows. Is it possible to do this without a loop
for i = 1:27
area(i,1) = trapz(MAM10(24*i-23:24*i,5));
end

채택된 답변

Walter Roberson
Walter Roberson 2017년 5월 18일
trapz( reshape(MAM10(:,5), 24, []) )

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Numerical Integration and Differentiation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by