How to interpolate missing value using n values before and after the missing data?
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello All,
I am trying to linearly interpolate a missing value by using values that were measured before and after the missing data. However, I don't want to use the first value measured before and after the missing data. Rather I would like use n values before and after the missing data for linear interpolation. How can I do that?
Here is an example of my problem:
I want to interpolate for value between x(5) and x(7). But I want to use n = 3 values before and after x(6) for linear interpolation. I.e. I want to use x(3), x(4), x(5) and x(7), x(8), x(9) values for interpolation.
x = [1 2 3 4 5 7 8 9 10];
Thanks,
Prashanti
8 Kommentare
John D'Errico
am 12 Jan. 2022
Bearbeitet: John D'Errico
am 12 Jan. 2022
@Jan Kudlacek - you CANNOT accept a comment as an answer. You never posted an answer, just a comment. If you think your comment deserves an acceptance, then you need to post it as an answer. We cannot even upvote comments.
Antworten (0)
Siehe auch
Kategorien
Mehr zu Multirate Signal Processing 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!