Skip to content

FinOrr/polyfit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PolyFit

License Top Language Issues Pull Requests

A lightweight C library for fitting polynomials to data—fast, simple, and no external dependencies.

What is it?

PolyFit is a small, embeddable C library for polynomial regression. It helps you fit a curve through a set of data points so you can interpolate or extrapolate with minimal effort.

Whether you're smoothing a signal, modeling system behavior, or generating transfer functions, polyfit is built to drop into your project and get out of your way.


Where It’s Useful

Here's a few real-world uses:

Signal Processing

Useful in cleaning up noisy data e.g., smoothing biomedical signals like EEGs.

Robotics & Navigation

Model sensor noise, trajectory paths, or estimate system motion with smooth, continuous polynomials.

Control Systems

Originally built to model dynamic systems using polynomial-based transfer functions. Great for:

  • Root locus
  • Frequency response
  • Pole-zero plots

Features

  • Polynomial curve fitting with configurable order
  • Supports both interpolation and extrapolation
  • Single-file: just drop in polyfit.c and polyfit.h
  • No dependencies beyond the standard library

Quickstart

Clone the Repo

git clone https://github.com/FinOrr/polyfit.git

Then just copy polyfit.c and polyfit.h into your project.

Include It

#include "polyfit.h"

Documentation

More detailed info and examples are available on the Wiki.


Contributing

Found a bug? Want to improve performance or add features? PRs welcome, just read the contributing guide first.


License

MIT. See LICENSE for full details.


Questions?

Open an issue if you get stuck or want to ask anything.

About

PolyFit is a C library providing polynomial fitting functionality.

Topics

Resources

License

Contributing

Stars

Watchers

Forks