|
OK, so I am trying it on a different dataset now, and am getting mixed results. I can get it to return data in a smaller grid than the original, but nothing larger. Here are my variables...
depth = 0, 1, 2, 3, 4, 4.5, 5
temp = 29.60 25.30 24.20 23.10 22.30 22.00 NaN
29.40 23.70 21.90 20.80 20.20 19.85 19.50
28.50 23.50 21.80 20.90 20.10 20.05 20.00
28.10 24.70 23.80 23.00 22.20 21.70 21.20
28.50 24.40 23.40 22.40 21.80 21.60 NaN
yknots = augknt([0:.5:4.5]kk)
kk = 3
pp = spap2(yknots,kk,depth,temp)
I keep getting a message saying:
The given knots and order are incompatible with the given data sites.
No subsequence of the data sites satisfies the Schoenberg-Whitney
conditions of the given order wrto the given knots.
If you have trouble coming up with a good knot sequence for the data
sites, try using spap2(l,k,x,y), with l the desired number of
polynomial pieces in the spline fit.
If I use the spap2(l,k,x,y) suggestion with pp = spap2(1,kk,depth,temp), then
yy = 0:.05:5;
vals = fnval(pp,yy);
I do get an interpolated surface, but the data at the original points has been changed. I need the original data to stay the same (make them knots). I have tried Tech support, but since I have a student edition they cannot help me.
|