Closed curve fitting of scatter plot data

11 visualizaciones (últimos 30 días)
Mariah Smith
Mariah Smith el 19 de Feb. de 2016
Respondida: Niko Lay el 28 de Ag. de 2017
I'm trying to find the best fit closed curve to a scatter plot. I have no clue where to start. The points come from GPS coordinates that are sequential so just doing plot(x,y) will not give me what I need. Here are a couple examples of what the data could look like (black dots) and the type of curve I'm trying to produce. It could make any arbitrary shape. Also since the dataset comes from GPS coordinates of a paths continually taken, the path could potentially overlap itself. In essence, I'm trying to get the "average route" taken from a plot of the same route taken continuously.

Respuestas (2)

Niko Lay
Niko Lay el 28 de Ag. de 2017
I had the same problem and solved it using polar coordinates instead of cartesian.
Transform coordinates to polar coordinates (cart2pol) then your curve is no more closed. This curve you can fit and after fiting tranform the coordinates from polar back to cartesian coordinates.

Walter Roberson
Walter Roberson el 19 de Feb. de 2016
If you have R2014b or later, try boundary()

Categorías

Más información sobre Interpolation en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by