See how it works on this video:
All class is interactive_curve.m file.
See help about this class:
1) set current directory to directory where interactive_curve.m place
in command window and push enter.
It is possible to change markers style, interpolation method, generate m-file ect.
Excellent work! But I have a question.
How can I define a userdefined function for interpolation? For example, defining a exponential decay function with ends as control points? (y=y0*exp^(-d*t)); where y0 is initial quantity, t is time, d is decay per unit time.
So when I drag the control points the curvature of the curve is controlled by exponential decay function and d gets calculated based on initial and final position of the control points (d = [log(y2) - log(y1)]/[x2-x1]).
Thanks in advance.
robert howrd, main thing here is not GUI, it is object that you can insert to any GUI. For example waveform generator: http://www.mathworks.com/matlabcentral/fileexchange/35183-waveform-generator-gui-2
confusing, GUI not well done, hard to use, not user friendly.
Jiro Doke, I made this
You can make a property (SetAccess = protected). Then I can still type:
m = ic.method
But I can't do this:
ic.method = 'BadMethod';
But what is the user want to know what method of interpolation is used curently than it will use m=ic.method; ic.setMehtod(...) change the method of interpolation and redraw line.
Oops, my original comment got deleted.
At first, I didn't realize you had all of these set* methods. I was trying to change the properties directly, because they were all public. My suggestion was to make some of the properties protected or hidden (if it's only used internally)
After playing with it some more, I realized that I was supposed to use the set* methods for change different properties. I see that if I use "setMethod" method, it updates the plot correctly.
I think that means the "method" property should be (setAccess = protected), so that people cannot change it.
Update No.2: set protected property for .method, mouse methods and figure close methsod now protected methods.
Update No. 1: marker color bug fixed, aditional dilte, new method: setMarkersPositions(), new property additionalDeleteFunctionHandle and other improvements.