Thanks for this excellent tool. I wish I had discovered it sooner. I have been writing custom quadratic programs to fit polynomials with various constraints (monotonicity, concavity, endpoint slopes, etc.) for years, but it seemed like every time required a slight variation on what I had done previously. This tool captures all of those things I was doing (and many more).
Figure 1 has additional space at the top and right in between panel 1 and panel 2 compared to panels 3 and 4 in figure 2. I just reinstalled v1.8 and removed all other versions from my path as a precaution. I am using R2010B.
We don't appear to be able to upload files or else I would include screenshots as well.
I need to retract my "correction" of lines 133-134 of Panel.m. However, I believe I am now closer to an answer. In normalized units, the border/title area is excluded from the control area. You have to compensate for this when you specify the width and height to obj.ShowSelectedChild. I can provide code, if interested.
I wanted to follow up on my previous comment. First, I believe lines 133-134 of Panel.m should be:
x0 = border;
y0 = border;
Also, the issue with the normalized panels appears to be that the uipanel reserves some space at the top of the panel such that a normalized position of [0 0 1 1] does not fully cover the area returned by getpixelpostion. I haven't figured out yet how to set/get what the "normalized" area actually is relative to the getpixelposition area.
I think this toolbox is fantastic. It has already saved me a ton of time. However, I wanted to point out one issue that has popped up recently. I believe that your bugfix in v1.7 that changed the unit-setting behavior when children are added has had some unintended consequences. Here's a simple example:
This produces a figure where there is an overly large gap between the top of the first panel and the second inset panel. In previous versions (definitely v1.5) the gap was much tighter. If you specify pixel units for the second panel explicitly:
Leonid - Yes, in the past I have had a few problems with errors in variables, easily enough solvable when the problem is purely linear. It gets a bit nasty when you have splines though. Sorry, but it is not something that SLM can solve. John
Thank you very much for putting together and sharing Shape Language Modeling !
I hope you could answer one question for me. When you fit a spline into a given data (or part of it) using MLS penalty
the data is divided by X coordinate and penalty is calculated in Y coordinate.
But for many datasets, X and Y are symmetric and what I'd see as a natural penalty in these cases would be
the Minimal Least Squares of a distance from each point to the curve/spline, calculated as length of orthogonal projection of a point onto that curve. Is there a way to use slmengine to find optimal fit this way ?
Markus - your question refers to the free knot solver in SLM. This uses fmincon because the problem is a (partly) nonlinear one in that case. The knot placement parameters enter nonlinearly here, although some of the parameters are still solved using a direct linear solver.
However the link that you show is a link for an LP solver. I did not see a nonlinear code there, although there are references to the ability to solve quadratic problems, thus least squares. (I admittedly know nothing about CPLEX.) So CPLEX could not be used to replace a call to fmincon as far as I could see.
When SLM is called for a fixed knot problem, I believe that CPLEX could probably be used to replace either of the calls to LSQLIN or LSE, but that does not appear to be your problem.
If anyone can offer a more intelligent response, feel free to help.
Wow that is really a great tool.
Is there a possibility to change the used optimizer from fmincom to CPLEX Solver? I hope to have an increased speed using that one. Somehow I have no idea how to deal with line "intknots = fmincon(@free_knot_obj,intknots,A,b, ...
,,,,,fminconoptions,x,y,prescrip);" and especially with the free_knot_obj function because CPLEX expects to have a matrix concerning http://pic.dhe.ibm.com/infocenter/cosinfoc/v12r2/index.jsp?topic=%2Filog.odms.cplex.help%2FContent%2FOptimization%2FDocumentation%2FCPLEX%2F_pubskel%2FCPLEX1131.html at that point. Is there someone who can give me a hint??
Have you read "readme.txt" file in "patch" folder, where p-file you've mentioned is located?
It mostly explains why they are there.
It looks like these files are fixed versions of core matlab functions, so developers won't release source code for them. Just hope that those issues would be removed some time.