Prev: Please point me to good Matlab toolbox for processing gigantic size tick data?
Next: Non-linear curve fit
From: Bruno Luong on 7 Jun 2010 07:45 "Jan Vidar " <jan.grindheim(a)gmail.com> wrote in message <huikos$sqh$1(a)fred.mathworks.com>... > 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? Not directly, but you could try to use an iterative strategy: 1. Estimate the abscissa of the point at a known length (e.g., sum of distances between data point) 2. Impose the slope at these points 3. Fit with the slope constraints 4. Reevaluate the length function , move the abscissa to the match the imposed length 5. Go to step 2 until it converges. Bruno
From: John D'Errico on 7 Jun 2010 08:30 "Jan Vidar " <jan.grindheim(a)gmail.com> wrote in message <huikos$sqh$1(a)fred.mathworks.com>... > 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? > Distance along a spline is a nonlinear thing. You can only solve it iteratively. There are no explicit capabilities to directly do this built into any of the splines tools. John
From: J Mathgeek on 10 Jun 2010 09:20 Is it possible to have more than 1 direction constraint between each fixed point? "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
From: John D'Errico on 10 Jun 2010 10:04 "J Mathgeek" <jmathgeek(a)gmail.com> wrote in message <huqoq7$9j7$1(a)fred.mathworks.com>... > Is it possible to have more than 1 direction constraint between > each fixed point? With care, you can do this. The problem is that you need enough degrees of freedom to allow the spline to fit the fixed points exactly. A C2 (twice continuously differentiable) cubic spline with N knots (breaks) has two more degrees of freedom than knot points. If natural or not-a-knot end conditions are employed, then those extra 2 degrees of freedom are lost. So for every fixed point and derivative constraint that you wish to specify, you must have at least one knot to allow an exact fit. You will need to provide sufficient knots to get the flexibility to do what you want. Don't think that you can scatter constraints completely at will even if you have sufficient degrees of freedom though. A single cubic segment only has a total of four degrees of freedom, and a few of them are used up to make the curve continuous and differentiable as desired. John
From: Bruno Luong on 10 Jun 2010 10:06 "J Mathgeek" <jmathgeek(a)gmail.com> wrote in message <huqoq7$9j7$1(a)fred.mathworks.com>... > Is it possible to have more than 1 direction constraint between > each fixed point? If you meant to enforce constraint A *or* constraint B (the "or" is important), then there is nothing more reliable than: enforcing constraint A in the fit, then enforcing constraint B in the fit, then compare the fit results. Bruno
First
|
Prev
|
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 |