Interpolation data from cyclic experiment: Non unique points in x axis
10 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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
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?
Réponses (1)
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.
0 commentaires
Voir également
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!