I want to know how can we get optimal piecewise linear functions using this tool. Right now, I think Xrange is equally divided based number of knots. For the given number knots, how to get the optimal locations of X which give best fit to data?
If this tool doesn't have the capability, can you suggest any other option.
Indeed a great tool. Unfortunately it works up until MATLAB 2014a. I have recently installed MATLAB 2014b and when I ran the example file I get the following error:
Undefined function 'plus' for input arguments of type 'matlab.ui.Figure'.
Error in magnifyOnFigure (line 433)
toolId = appDataStruct.figureHandle +...
Error in magnifyOnFigure_examples (line 23)
Is there a way around this? I am aware that in MATLAB 2014b some changes have been implemented with respect to figure plotting. I am not sure if this is related to the error.
Thank you in advance!
09 Sep 2014
Powerful on-figure magnifier, suitable for the publication of compact graphical results
I have found a temporary fix for the exporting as eps problem. When you export, do not "Save As" but instead use "Export Setup". Under "Rendering" in Properties, choose the Resolution as "Screen" (do NOT use Auto). This should keep the magnifying square where it should be.
Eshwar - I considered offering a 5th order or higher fit when I wrote the code. I did not do so however, for valid reasons, at least what I considered valid ones.
- I've only rarely ever needed more than 3rd order. In one such case we were modeling paper paths through a copier, and the path needed to be smoother than a cubic spline could offer.
- Higher orders than a cubic are a serious problem for many of the most useful constraints one may want to apply. Monotonicity for example, is done using a set of necessary constraints based on an inequality from a Fritsch and Carlson paper. Higher orders than cubic however will not allow such a nice solution, so we would have problems ensuring true monotonicity. The curvature constraints would also be more difficult to satisfy.
So in the end, I chose not to implement higher orders than cubic. Sorry.