How to divide an arc?

1 visualización (últimos 30 días)
Sudeep
Sudeep el 3 de Jun. de 2013
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...

Respuestas (3)

Matt Kindig
Matt Kindig el 3 de Jun. de 2013
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 el 3 de Jun. de 2013
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 el 3 de Jun. de 2013
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.

Categorías

Más información sobre Numerical Integration and Differential Equations en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by