Skip to content

Instantly share code, notes, and snippets.

@ksjgh
ksjgh / polynomial_fitting.cpp
Last active December 6, 2025 21:38
Polynomial fitting
// In this quiz you'll fit a polynomial to waypoints.
#include <iostream>
#include "Dense"
using namespace Eigen;
/////////////////////////////////////////////////////////////////////////////////////////////
// Fit a polynomial.
// Adapted from
// https://github.com/JuliaMath/Polynomials.jl/blob/master/src/Polynomials.jl#L676-L716