Re: Derivative of splinefit w.r.t. control points.
- From: "Dana" <delouis@xxxxxxxxxxxxx>
- Date: Wed, 21 Sep 2005 14:04:16 -0400
> But my problem is that I use the spline-toolbox of Matlab and therefore I
> don't have direct access to the equations.
Hi. I don't have Matlab, but Mathematica.
In Mathematica, all the "equations" variables are the 4th item in the Spline
object.
Is there anything similar in Matlab?
example:
pts = {{0, 0}, {1, 2}, {-1, 3}, {0, 1}, {3, 0}};
spline = SplineFit[pts, Cubic]
spline[[4]]
{{{0, 111/56, 0, -(55/56)},{0, 57/28, 0, -(1/28)}},
{{1, -(27/28), -(165/56), 107/56}, {2, 27/14,-(3/28), -(23/28)}},
....etc
Each list of 4 items represents the a,b,c,d in a*x3 +b*x^2+c*x +d
Therefore, it's easy to take the Derivative
HTH
--
Dana DeLouis
"Maurice van de Rijzen" <bertvansesamamstraat@xxxxxxxxxxx> wrote in message
news:1dc2c$433176d6$82a1bc06$7365@xxxxxxxxxxxxxxxxxxx
> Dear Peter,
>
> I already thought so.
> But my problem is that I use the spline-toolbox of Matlab and therefore I
> don't have direct acces to the equations.
> Furthermore is my problem bivariate the makes bit more difficult.
> I use a natural cubic spline.
> I hoped it would be possible to retrieve them in one way or the other from
> the spline-coefficients either on the polynomials or B-spline formulation.
> Do you know whether this would be possible?
> Thanks,
> Maurice
>
>> In article
>> <26396943.1127226707247.JavaMail.jakarta@xxxxxxxxxxxxxxxxxxxxxx>,
>> Maurice <bertvansesamstraat@xxxxxxxxxxx> writes:
>> >Dear All,
>> >I'm working on an optimization problem using splines.
>> >Now I've the following question.
>> >Say that I've a cubic natural spline f(x). >This implies that the
>> variables of the function are the values at the control
>> points,(y(0)..y(N)).
>> >Is it possible to determine the derivative of the fit in a certain
>> evaluation point analytically. >df/dy(0) | x=x_eval.
>> >Thanks in advance,
>> >Maurice
>>
>> yes of course. go through the complete algorithm to compute the spline
>> and
>> differentiate each equation , using chain rule, with respect to the y's.
>> then you will get the derivative of the splines' coefficients with
>> respect to the data and can evaluate the derivative of the spline with
>> respect to the data
>> by evaluating the representation with the new coefficients instead of the
>> original ones. hth
>> peter
>>
.
- Follow-Ups:
- Re: Derivative of splinefit w.r.t. control points.
- From: Maurice van de Rijzen
- Re: Derivative of splinefit w.r.t. control points.
- References:
- Re: Derivative of splinefit w.r.t. control points.
- From: Peter Spellucci
- Re: Derivative of splinefit w.r.t. control points.
- Prev by Date: Re: Derivative of splinefit w.r.t. control points.
- Next by Date: Re: Global Optimization
- Previous by thread: Re: Derivative of splinefit w.r.t. control points.
- Next by thread: Re: Derivative of splinefit w.r.t. control points.
- Index(es):
Relevant Pages
|