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

2 ビュー (過去 30 日間)
Md
Md 2017 年 2 月 2 日
コメント済み: Walter Roberson 2017 年 12 月 28 日
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 Center および File ExchangeData Types についてさらに検索

タグ

タグが未入力です。

Community Treasure Hunt

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

Start Hunting!

Translated by