Code covered by the BSD License  

Highlights from
Fit logarithmic spiral to x,y data

Be the first to rate this file! 10 Downloads (last 30 days) File Size: 19.75 KB File ID: #21749
image thumbnail

Fit logarithmic spiral to x,y data

by H.J. Sommer

 

15 Oct 2008 (Updated 15 Oct 2008)

Fits logarithmic sprial r=a*exp(b*theta) to x,y data points.

| Watch this File

File Information
Description

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.

MATLAB release MATLAB 7.5 (R2007b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
fit H.J. Sommer 22 Oct 2008 10:24:30
curve H.J. Sommer 22 Oct 2008 10:24:30
logarithmic H.J. Sommer 22 Oct 2008 10:24:30
spiral H.J. Sommer 22 Oct 2008 10:24:30
log H.J. Sommer 22 Oct 2008 10:24:30

Contact us at files@mathworks.com