changing mean and median
Show older comments
i have a column vector of 100 rows and would like to calculate its progressive median and mean for example (at the first row, only consider that row; at second row, consider first 2 rows; at third row, consider the first 3 rows and so on upto 100th row). I have used a for loop with sum/i to calculate the mean but I have failed to break through in calculating median. Kindly provide a solution or any alternatives.
4 Comments
Fangjun Jiang
on 17 Jul 2020
Can't you use mean() and median()?
Anita Nabatanzi
on 17 Jul 2020
Rachel Surridge
on 17 Jul 2020
Does your data have more than one column?
Anita Nabatanzi
on 17 Jul 2020
Accepted Answer
More Answers (0)
Categories
Find more on Creating and Concatenating Matrices 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!