averaging two curves of different points
5 views (last 30 days)
Show older comments
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 Comments
Answers (1)
John D'Errico
on 25 Mar 2014
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 Comments
See Also
Categories
Find more on Interpolation in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!