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.
댓글 수: 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!