I have a plot in Matlab where the data points (15 of them) are located with different distances between each other. I have an interval (5 data points, nr 6 to 10) almost in the middle where the data points are a bit closer to each other and where I would like to calculate the weighted average of these.
I have,
y = [1.008;0.989;0.991;0.982;0.992;0.997;0.994;0.998;0.995;1.002;0.998;0.997;1.002;0.994;0.989]
x = [5.2;10.2;15.5;20.7;25.1;25.6;30.6;36.4;39.6;43.7;47.8;52.0;57.6;63.8;68.4]
where I want the interval of data pt 6-10 to be weighted. Is the weight vector for the whole span or just my interval?
Edit; I want to calculate what weight each of these 5 data points (nr 6-10) have.