Thanks, Ben. I didn't know the setappdata/getappdata pair, so I actually wrote one myself as a function, just adding my var to myhandles and attach to the figure handle. It worked fine for me so far :).
Ben, Thanks for the reply. I was trying to do this:
bp = uiextras.BoxPanel('Parent',hf,...
bp.Title = 'Original Title';
The objective is to be able to modify the title in a callback. I thought I could use the handle returned by findobj with tag string, but that handle seems not working. I think it due to the fact that the handle returned by findobj is the handle to the container of the composite GUI object, so it's not directly related to the title banner. Now I use guidata to save the actual handle of the boxpanel, then retrieve it inside the callback, and it works fine.
I don't know how difficult it is to modify the layout toolbox source code to make this happen, I will spend sometime look it up after finishing current task.
Thanks again for sharing a great GUI tool.
Welcome to the fun of floating-point arithmetic. First, the duplicate points *are* removed, but this is not obvious unless you display all the digits of the result. For your third example, the four "duplicates" are actually all different, but only in the final bit (you can see it with "format hex"). I don't think there's anything I can do to make this work correctly in all cases.
Second, why should something fail if an intersection occurs at a segment boundary? Some people would like to consider this a proper intersection and others not (I know this from several discussions on the topic). As a user, you will have to evaluate the results you get for your particular application.
In many real world applications, where the two curves are formed from real data, this issue never comes up at all. It's (mostly) only from textbook type problems that you'll see this behavior.