Prev: Please point me to good Matlab toolbox for processing gigantic size tick data?
Next: Non-linear curve fit
From: J Mathgeek on 2 Jun 2010 09:40 We've got a spline problem: A cable is represented by a number of fixed points. In the middle between each of these points we know the direction of the cable (a "compass direction measurement"). The cable is being represented by a cubic spline through the fixed points. However, we also need to utilize the direction information. I wonder if it is possible to use a derivative constraint or something? Or, if the SLM - Shape Language Modeling could do this: http://www.mathworks.com/matlabcentral/fileexchange/24443-slm-shape-language-modeling Any ideas or suggestions? Regards, Jan
From: Bruno Luong on 2 Jun 2010 17:23 "J Mathgeek" <jmathgeek(a)gmail.com> wrote in message <hu5n06$dbi$1(a)fred.mathworks.com>... > We've got a spline problem: > > A cable is represented by a number of fixed points. > In the middle between each of these points we know the > direction of the cable (a "compass direction measurement"). > > The cable is being represented by a cubic spline through the fixed points. > However, we also need to utilize the direction information. > I wonder if it is possible to use a derivative constraint or something? > Or, if the SLM - Shape Language Modeling could do this: > http://www.mathworks.com/matlabcentral/fileexchange/24443-slm-shape-language-modeling > > > Any ideas or suggestions? Might be this: http://www.mathworks.com/matlabcentral/fileexchange/25872-free-knot-spline-approximation Bruno
From: John D'Errico on 2 Jun 2010 17:53 "J Mathgeek" <jmathgeek(a)gmail.com> wrote in message <hu5n06$dbi$1(a)fred.mathworks.com>... > We've got a spline problem: > > A cable is represented by a number of fixed points. > In the middle between each of these points we know the > direction of the cable (a "compass direction measurement"). > > The cable is being represented by a cubic spline through the fixed points. > However, we also need to utilize the direction information. > I wonder if it is possible to use a derivative constraint or something? > Or, if the SLM - Shape Language Modeling could do this: > http://www.mathworks.com/matlabcentral/fileexchange/24443-slm-shape-language-modeling > SLM will do it easily enough, as long as you have the optimization toolbox. Your compass direction is just a slope, or at least you can turn it into one. Make sure you have enough knots, otherwise it will not be an exact fitting spline. A knot at each listed point, plus an additional knot at the intermediate points will give you an exact solution. For example, here is such a spline, fit to an exponential function, where the intermediate values are given as slopes. X = 0:.2:1; Y = exp(X/2); Xint = 0.1:0.2:0.9; Yprime = .5*exp(Xint/2); slm = slmengine(X,Y,'knots',0:.1:1,'xyp',[Xint',Yprime']); plotslm(slm) I guess you will need to take my word for it that the curve fits very nicely, and goes through the points as provided. Or you can try the above example for yourself. HTH, John
From: Bruno Luong on 2 Jun 2010 18:07 Same example as John, but using the other package: ;-) X = 0:.2:1; Y = exp(X/2); Xint = 0.1:0.2:0.9; Yprime = .5*exp(Xint/2); slope = struct('p',1,'x',Xint,'v',Yprime); pp = BSFK(X,Y,[],[],[],struct('Animation',1,'pntcon',slope)) % Bruno
From: Jan Vidar on 7 Jun 2010 07:22 What if the slopes are at known lengths along the spline from the fixed points, (e.g., slope no. 1 is 2.5 meters along the spline from fixed point no. 1 and 3.9 meters along the spline from fixed point no. 2), would that be possible to do? Jan "Bruno Luong" <b.luong(a)fogale.findmycountry> wrote in message <hu6km8$kqg$1(a)fred.mathworks.com>... > Same example as John, but using the other package: ;-) > > X = 0:.2:1; > Y = exp(X/2); > > Xint = 0.1:0.2:0.9; > Yprime = .5*exp(Xint/2); > > slope = struct('p',1,'x',Xint,'v',Yprime); > pp = BSFK(X,Y,[],[],[],struct('Animation',1,'pntcon',slope)) > > % Bruno
|
Next
|
Last
Pages: 1 2 3 Prev: Please point me to good Matlab toolbox for processing gigantic size tick data? Next: Non-linear curve fit |