average multiple curves matlab

2 ビュー (過去 30 日間)
abdullah algarni
abdullah algarni 2016 年 6 月 18 日
コメント済み: Star Strider 2021 年 9 月 6 日
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
Soraya Ghassemlou 2021 年 9 月 6 日
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 Center および File ExchangeInterpolation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by