How to divide an arc?

2 次查看(过去 30 天)
Sudeep
Sudeep 2013-6-3
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...

回答(3 个)

Matt Kindig
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.

Walter Roberson
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.)

Roger Stafford
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.

类别

Help CenterFile Exchange 中查找有关 Surface and Mesh Plots 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by