Interpolation data from cyclic experiment: Non unique points in x axis

조회 수: 8 (최근 30일)
jonatas stefanello
jonatas stefanello 2020년 5월 18일
답변: John D'Errico 2020년 5월 18일
Hi.
I have a set of data points obtained in a experiment. I want to get an average curve for all the tests, but i am having trouble to interpolate the data to the same x axis points. The curves are all similar to the figure below.
The .fig of the figure is too big to attach, so i will post the link for the file in onedrive: file.fig
Any help will be welcome.
  댓글 수: 2
Ameer Hamza
Ameer Hamza 2020년 5월 18일
Can you share sample data and the code to generate the current plot, to make it easy for us to suggest a solution?
jonatas stefanello
jonatas stefanello 2020년 5월 18일
I edited the question and included a link for the .fig file.

댓글을 달려면 로그인하십시오.

답변 (1개)

John D'Errico
John D'Errico 2020년 5월 18일
You cannot use interp1 to solve this, at least not directly, since the data does not represent a single valued function of x. This appears to be some sort of hysteresis curve. Could you possibly do something where you interpolate each curve with respect to a parameter such as time, now interpolating 100 points along each curve? Possibly. Now you could try to take an average over all curves.
Alternatively, you could use a code like my interparc utility (found on the file exchange) to interpolate the curves. Again, generate 100 points along each curve, THEN take the average.
Either of these ideas will probably fail, because what you really probably want to do is to shift and scale each curve so they are all consistent with each other. That is, it would be meaningless to compare the tiny curves at the left end with those on the right in your picture, and taking a direct average without any transformation would be just as wrong.
I don't have your data, so I can go no further in this.

카테고리

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