How to divide an arc?
1 次查看(过去 30 天)
显示 更早的评论
I have a third degree polynomial,which if plotted looks like an arc. I want this arc to be divided into 10 equal parts. Does any matlab function can do it..Please suggest some alternatives...
0 个评论
回答(3 个)
Matt Kindig
2013-6-3
If I understand your question correctly, John D'Errico's interparc ( http://www.mathworks.com/matlabcentral/fileexchange/34874-interparc) is designed to do exactly this.
0 个评论
Walter Roberson
2013-6-3
If the segments are to be divided by length, then you will need to use the arc length formula to determine the total length:
s = integral from a to be of sqrt(1 + (dx/dy)^2) * dx
Divide by the number of segments, and then solve a series of integral equations to find the coordinates, first from "a" to a+s/10, then from a+s/10 to a+2*s/10 and so on.
You probably will not find a closed-form solution for the arc of a third degree polynomial (but perhaps there is one in terms of elliptics; I do not know.)
0 个评论
Roger Stafford
2013-6-3
I suggest you use one of the 'ode' solvers to solve the differential equation:
ds/dx = sqrt(1+(dy/dx)^2)
where y(x) is your polynomial with x ranging over the full extent of your given arc and with s initially zero. For more accuracy, you can specify the fineness of x intervals to be used by the 'ode' solver. This will give you a vector s. You can use 'find' afterwards to find the one-tenth equal intervals in s and thereby determine the corresponding values of x at these points. You may prefer to use interpolation here in obtaining more accurate x values at these nine dividing points.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Numerical Integration and Differential Equations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!