- Check the dimensions of each data.
- Fix the common x-axis data to get the all the data to this x-axes. I would pick the data1, as it covers the more range of x-axes when compared to other data.
- Get the data2, data3 to the x-axes domain of data1.
- Use interp1 to get the data2, data3 to the x-axes range of data1. The extrapolation points should be set to NaN.
- Use nanmean or mean nan flags to get the avarage of data1, data2 and data3.
How to plot the average plot out of three plots
조회 수: 3 (최근 30일)
이전 댓글 표시
Hello everyone, i have extracted the data from the excel to plot the graphs .Now , i want to plot the average plot in the same graph .i have three plots in the same graph which each of the three has different 1 column but different rows.i would be grateful if anyone could help me to get the idea of how to plot that graph.Thank you in advance.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/351638/image.png)
댓글 수: 0
채택된 답변
KSSV
2020년 8월 26일
You should decide the x-axis same for all the data and make y-values NaN for out of odmain/ extrapolation range and use mean/ nanmean.
댓글 수: 6
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!