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

10 vues (au cours des 30 derniers jours)
jonatas stefanello
jonatas stefanello le 18 Mai 2020
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 commentaires
Ameer Hamza
Ameer Hamza le 18 Mai 2020
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 le 18 Mai 2020
I edited the question and included a link for the .fig file.

Connectez-vous pour commenter.

Réponses (1)

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

Catégories

En savoir plus sur Interpolation dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by