Finding the mean of data with different array sizes

Hello,
I have multiple arrays, each with a percentage column and a data column. The lengths of the arrays are all different, although the values all go from 0 to 100% in the first column.
I would like to average the data in order to investigate any trends, but I am not sure how to average the data while the matrix lengths are all different.
I am not wanting to fill any data points with zero, as I am looking to maintain the 0-100% for each of the data sets. I have attached a graph of all of the data points plotted of which I am looking to average.
Is there a way to do this?
Thanks,
Beck

 채택된 답변

KSSV
KSSV 2021년 7월 9일

0 개 추천

You can get all those arrays into same size using interp1 and hen use mean.

댓글 수: 3

Thank you - I have now managed to get all the data into the same length vectors using the interp1 function!
Would you be able to advise me on how to then average the data between the different vectors?
Arange the arays into matrix and call the function mean.
Thank you!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

제품

릴리스

R2021a

질문:

2021년 7월 9일

댓글:

2021년 7월 9일

Community Treasure Hunt

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

Start Hunting!

Translated by