averaging two curves of different points

5 次查看(过去 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.

回答(1 个)

John D'Errico
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...

类别

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