No BSD License  

Highlights from
Rational Polynomial curve fitting

5.0

5.0 | 1 rating Rate this file 22 Downloads (last 30 days) File Size: 4.58 KB File ID: #11197

Rational Polynomial curve fitting

by Paul Godfrey

 

25 May 2006 (Updated 26 May 2006)

Fits a function to a quotient of polynomials

| Watch this File

File Information
Description

This program finds 2 polynomials, Num(x) and Den(x) such that Num(xi)/Den(xi) = y(xi) in a least squares sense.

The function, y(xi), may have infinite values and zero values.

This is an upgrade to Matlab's Polyfit command.

MATLAB release MATLAB 6.5 (R13)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
04 Jan 2012 John

Great job, and good examples.

A couple of modifications that could be implemented.

Let there be one input, the order of the denominator, and accept an array. Calculate rms error and return that for the array. Could either set the numerator to the denominator, or sweep the numerator from 2 to the order of the denominator.

Incorporate a lag term, including raising the exponent to a power.

In your examples, you may want to include extracting the polynomial from a psd, generating a time history from a filter on rand, and replotting the resulting psd for comparison.

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
approximation Paul Godfrey 22 Oct 2008 08:26:53
interpolation Paul Godfrey 22 Oct 2008 08:26:53
rational Paul Godfrey 22 Oct 2008 08:26:53
polynomial Paul Godfrey 22 Oct 2008 08:26:53
curve Paul Godfrey 22 Oct 2008 08:26:53
fit Paul Godfrey 22 Oct 2008 08:26:53
squares Paul Godfrey 22 Oct 2008 08:26:53
least Paul Godfrey 22 Oct 2008 08:26:53
fitting Paul Godfrey 22 Oct 2008 08:26:53
fit christoph heinz 18 Feb 2010 08:26:27
approximation Ondrej 07 Jun 2010 19:06:03
rational Ondrej 08 Jun 2010 03:21:12

Contact us at files@mathworks.com