Fit logarithmic spiral to x,y data
Logaritmic spirals often occur in nature such as the cross section of a chambered nautilus, atmospheric vortices around regions of low pressure and spiral arms of galaxies. Polar form for a log spiral with center at the origin is r=a*exp(b*theta). A general log sprial with center at xc,yc is then x=xc+r*cos(theta) and y=yc+r*sin(theta). This code fits coefficients a,b and center location xc,yc to data points along the log spiral curve. It uses the nonlinear Nedler-Mead simplex routine "fminsearch" to find the best center location and a simple linearized least-squares solution for coefficients a,b. The code provides an RMS measure for goodness-of-fit.
Cite As
H.J. Sommer (2024). Fit logarithmic spiral to x,y data (https://www.mathworks.com/matlabcentral/fileexchange/21749-fit-logarithmic-spiral-to-x-y-data), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 |