Linear Interpolation listed data points on to anothe list
Show older comments
I have range of measurments as shown
x_data = (0.7127, 0.6954, 0.6789, 0.6744, 0.6697, 0.6649, 0.6600, 0.6551, 0.6501, 0.6450,
0.7127, 0.7091, 0.6988, 0.6827, 0.6626, 0.6574, 0.6520, 0.6466, 0.6411, 0.6356,
0.6300, 0.6245, 0.6190)
I want to interpolate (linear) the above x data on to new unformly spaced z value given by:
z_new = 0:10/6371:0.244
Given that the x list has differnet length than the new data (z) how do we do this interpolation?
I tried this from mathworks online but not working:
"vq = interp1(x,v,xq) returns interpolated values of a 1-D function at specific query points using linear interpolation. Vector x contains the sample points, and v contains the corresponding values, v(x). Vector xq contains the coordinates of the query points"
Thank you
Accepted Answer
More Answers (0)
Categories
Find more on Interpolation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!