Finding tangent at Spline Function
Finding tangent at Spline Function
(OP)
Hello.
I have some piecewise polynomial (pp).
And I have to find a point with tangent = 45'.
How can I do it using built function in Spline ToolBox.
Thanks
I have some piecewise polynomial (pp).
And I have to find a point with tangent = 45'.
How can I do it using built function in Spline ToolBox.
Thanks





RE: Finding tangent at Spline Function
Let's say on the interval of interest the function is quadratic
y(x) = ax^2 + bx + c
y(45) = a*45^2 + b*45 + c
That is a point
dy/dx = 2ax + b
dy/dx(x=45) = 2*a*45 + b
That is a slope
=====================================
Eng-tips forums: The best place on the web for engineering discussions.
RE: Finding tangent at Spline Function
Are you looking for a point with slope of 1 (45 degrees from axis)?
=====================================
Eng-tips forums: The best place on the web for engineering discussions.
RE: Finding tangent at Spline Function
thanks
RE: Finding tangent at Spline Function
Again assuming a quadratic fit...
y(x) = ax^2 + bx + c
dy/dx = 2ax + b
For dy/dx = 1
dy/dx = 2ax + b = 1
x = (1-b)/(2a)
For dy/dx = -1
dy/dx = 2ax + b = -1
x = (-1-b)/(2a)
Calculate the x for each of these and see if it falls within the interval that the quadratic is valid for. If it is, then it is a point with 45 degree angle slope. If both solutions (for slope = 1 and slope=-1) are outside of the interval that the quadratic is defined for, then there is no 45-degree slope in that interval.
=====================================
Eng-tips forums: The best place on the web for engineering discussions.