フィルターのクリア

i have a matrix like:A=[9 7 8 4 2 5 1 8 6 12]. i wanna add the first 5 elements .how can I do this?

1 回表示 (過去 30 日間)
i have a matrix like:A=[9 7 8 4 2 5 1 8 6 12]. i wanna add the first 5 elements .how can I do this?

採用された回答

Image Analyst
Image Analyst 2016 年 4 月 23 日
Try this:
sumFirst5 = sum(A(1:5));

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by