Hi,
I am proccessing data from the physionet Staff III database. I take the data, apply a bandpass filter and then apply cubic spline interpolation with the 'Spline' function. For the vast majority of data (~80%) this works well (I will include a list of the troublesome data below).
The error is listed as:
Error using chckxy (line 50)
The first input must contain unique values.
Error in spline (line 72)
[x,y,sizey,endslopes] = chckxy(x,y);
Error in Final_Year_Project_0_1_2>cubicspline (line 491)
yy = spline(x,twelveLead_9(lowers-20,i),xx);
My code to preform the cubic spline interpolation:
x = lowers;
xx = 0:1:length(twelveLead_9);
splineData =[];
for i = 1:9
yy = spline(x,twelveLead_9(lowers-20,i),xx);
splineData = vertcat(splineData, yy);
end
splineDataT = splineData.';
ecgDataNoSpline = (twelveLead_9 - (splineDataT(1:length(twelveLead_9),:)));
Looking at the first 20 patients on the staff III database (001a-020f) the files that do not work are (002e, 009c, 010c, 011b, 011c, 011d, 013b, 013c, 013d, 013e, 013f, 014a, 014c, 014d, 014f, 015b, 016e, 018d, 019b, 020b, 020c) This accounts for about 20% of the data so I cannot just ignore it.
I do not understand the error code, I have looked at similar problems here, and here but they don't seem to help or I am missing soemthing.
Thanks in advance,
Christopher