averaging two curves of different points

5 vues (au cours des 30 derniers jours)
Samuel
Samuel le 25 Mar 2014
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.

Réponses (1)

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

Catégories

En savoir plus sur Interpolation dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by