I think there is an error when you use piecewise constant (k=1). The results are not the expected. Is it ok?
Also I would like to know if it would be very difficult to modify it and use it for surfaces instead of lines (1D -> 2D).
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?