BSFK starts
??? Error using ==> sparse
Sparse matrix sizes must be non-negative integers less than MAXSIZE as defined by
COMPUTER. Use HELP COMPUTER for more details.

Error in ==> BSFK>BuildDineqMat at 1623
D = sparse(row,col,val,m,n);

Error in ==> BSFK>UpdateConstraints at 2039
[D LU X] = BuildDineqMat(t, knotidx, k, shape);

Error in ==> BSFK>InitPenalization at 2077
smoothing = UpdateConstraints(smoothing, t, shape, pntcon, periodic);

Error in ==> BSFK at 393
smoothing = InitPenalization(y, t, k, d, lambda, p, regmethod, ...

However, if I use 'chebyschev' instead of a vector of starting knots, it works. But it misses some important knots.

Hi,
I´m always getting the following warning message:
Warning: Options LargeScale = 'off' and Algorithm = 'trust-region-reflective'
conflict. Ignoring Algorithm and running active-set algorithm. To run
trust-region-reflective, set LargeScale = 'on'. To run active-set without this
warning, set Algorithm = 'active-set'.
What am I doing wrong?

Richard,
not exactly like you want but you can enforce the y-value between two knots to be zero:
x=linspace(0,2*pi,100);
y = sin(x);
y = y + 0.1*randn(size(y));
nknots = 5;
lo = -inf(1,nknots);
up = +inf(1,nknots);
lo(3) = 0;
up(3) = 0;
shape = struct('p',0,'lo',lo,'up',up);
options = struct('shape', shape,'animation', 1, 'knotremoval','none');
BSFK(x,y,4,nknots,[],options);

Brilliant package Bruno. Quick question.
I know you can fix any given knot, but is it possible to fix a given not to a y-value but let the least squares find the best x-value for it?
I'm using 4 knots/3 lines to represent my data but I would always like the 3rd knot to have y=0. While this condition is met some of the time (by chance) ideally I would like to enforce it.

Comment only