Internal math error when using interpolation
14次观看(最近30天)
Show older comments
I am using MATLAB to process and evaluate reflection coefficients of antennas.
The data is saved and used as an Mx2 array, where the M is the length of the x-axis data points, (or sample points). The first coloumn contains the values of the frequency points and the second coloumn contains the corresponding reflection coefficient values.
I use the 'interp1' function, which worked for the arrays of length 501, but the other array sized, 402, 404, 408 and 505, the following error occurs:
Error using matlab.internal.math.interp1
Sample points must be unique and sorted in ascending order.
Error in interp1 (line 188)
VqLite = matlab.internal.math.interp1(X,V,method,method,Xqcol);
I checked, and my sample points are unique and in ascending order, but the error still persists.
Here is a little snippet of the data
Sample point Reflection coefficient value
200 0.979472485068518
204.500000000000 0.977219575869647
209 0.974701356449019
213.500000000000 0.971883119143293
218 0.968724759813479
222.5000000000 0.965179866285502
227 0.961194345460292
231.500000000000 0.956704944454534
236 0.951637259422883
240.5000000000 0.945903325003744
245 0.939398658119580
Any and all help will be greatly appreciated.
Answers (0)
See Also
Categories
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!