Average of first few elements of an array

I have a one dimensional array A of 2000 elements.
How do I calculate the mean of elements from 500th to 1200th?

 Accepted Answer

mean(A(500:1200))

4 Comments

I am submitting a research paper today. And for the numerical solution of the problem studied in the paper, I had a couple of minor technical issues for the coding part which I got it resolved from some contributors including you.
Glad to hear that!!. Best of luck!

Sign in to comment.

More Answers (0)

Categories

Find more on Programming in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!