Clear Filters
Clear Filters

How can ı calculate the mean of an interval?

11 views (last 30 days)
There are 300 elements in my vector (vector A). I want to calculate the mean of all the elements from 200th to 300th element. How do I do that?

Accepted Answer

KSSV
KSSV on 28 Aug 2017
A = rand(300,1) ;
iwant = mean(A(200:300)) ;

More Answers (0)

Categories

Find more on Multidimensional Arrays 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!