average multiple curves matlab

3 次查看(过去 30 天)
Hello every body I have multiple xy curves extacted from experiments results (X1 vs Y1, X2 vs Y2,......X5 vs Y5), I looking for method to plot the Xavg vs Yavg. Thanks

采纳的回答

Star Strider
Star Strider 2016-6-19
Use interp1.
  4 个评论
Soraya Ghassemlou
how would you do this for 50 curves?
Star Strider
Star Strider 2021-9-6
I would use a for loop.
The code would have to be changed to accommodate that, and to put the curves in a cell array and then index them as such in the loop and then average them (since the point here is that the curves have different dimensions, and so would not be in a matrix).
It also assumes that the ‘x’ vectors cover the same range (initial and final values), so the interpolation would simply equalise the number of elements in each of them, and the associated ‘y’ vectors. If that were not the situation, this would become more complicated, and likelly considerably so.
.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Interpolation 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by