필터 지우기
필터 지우기

How to get average of an array except considering the last element of the array

조회 수: 1 (최근 30일)
I would like to get the average of an array without considering the last element of the array.
Thanks in advance.

채택된 답변

Andrei Bobrov
Andrei Bobrov 2017년 2월 2일
Let A - your double array
B = A(:);
out = mean(B(1:end-1));

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Types에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by