- Use unique or uniquetol to determine where the duplicates are.
- Use max to find the maximum value among each set of duplicates
- Index into the array and change the value of all duplicates in each set to the maximum value.
Retaining the max value during scattered data interpolation
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Aykut Ayca
am 25 Sep. 2019
Kommentiert: Aykut Ayca
am 27 Sep. 2019
Hi,
Currently scatteredinterpolant averages out the valus of duplicate data points. Is there a way or a different function to keep the max (or min) of the duplicate values when performing scattered data interpolation?
Thanks,
Aykut
0 Kommentare
Akzeptierte Antwort
Josh Meyer
am 26 Sep. 2019
You'll need to do this manually before calling scatteredInterpolant. There are a few ways to do it, you could use a logical mask, filter the points out, etc... but here is one method:
When you call scatteredInterpolant on the resulting matrix, it will still average the duplicates, but they will all have the same value.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Interpolation finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!