averaging two curves of different points
8 次查看(过去 30 天)
显示 更早的评论
I right now have two sets of xy data, constituting 2 curves. They are similar in plot shape, but different in number of points(e.g., plot one is a 1200 by 2, plot two is a 3000 by 2). How would I go about getting an average curve of it?
Research on this using matlab showed people tried to make use of the interp1 function and/or the curve fitting tool, but I couldn't find a reasonable set of procedure or description to do this exact function.
Any help will be appreciated. thanks in advance.
0 个评论
回答(1 个)
John D'Errico
2014-3-25
Interpolate the first curve to live on the same set of points as the second. Use interp1 to do this. Then average the resulting y values. (I'm not sure what more you need in terms of a description.)
Note that the interpolation introduces errors due to interpolation. There are no errors introduced at the original points of course, because it is interpolation. But between the points...
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Interpolation 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!