If you give Matlab a set of points and perimeters can it give you an equation?

2 views (last 30 days)
How would you create a function using Matlab, with six given points and their perimeters?
Attached is the graph of the equation we need to find. An object must follow the path represented in the attached graph. The black rectangles represent the perimeters that the object can move through.
Any information given, that is used, will be cited. Thanks in advance, Mike

Answers (4)

Image Analyst
Image Analyst on 22 Nov 2013
You didn't attach anything. Be sure you click the Attach File button after you browse to your file, otherwise it will not be attached. Have you tried the curve fitting Toolbox? Or simply tried polyfit()?

Matt J
Matt J on 22 Nov 2013
You could use LSQCURVEFIT, if you have it.

Walter Roberson
Walter Roberson on 22 Nov 2013
I suggest trying a cubic spline fit.

Roger Stafford
Roger Stafford on 22 Nov 2013
You could also use a fifth order Lagrange polynomial to go through all six points. See:
http://en.wikipedia.org/wiki/Lagrange_polynomial
Note: I don't see the point in your black rectangles. If a curve passes through their central point, it must follow that the curve has also passed through the rectangle.

Community Treasure Hunt

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

Start Hunting!