How can I plot an average line through this line graph

134 views (last 30 days)
How can i plot the average of these line graphs onto the same graph?

Accepted Answer

Marco Wassmer
Marco Wassmer on 26 Oct 2016
assuming your data is stored in the vectors x1....x8 of the same length:
sum each component and divide by the number of lines:
The plot in the plot:
if your time vectors are not the same then you will have to interpolate

More Answers (1)

Thorsten on 26 Oct 2016
You store the values of each line in the rows of matrix X. Then use


Find more on 2-D and 3-D Plots 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!