pub fn least_square(node_x: Vec<f64>, node_y: Vec<f64>) -> Polynomial
Expand description

Simple Least Square 2D

Type

(Vec, Vec) -> Polynomial

Examples

#[macro_use]
extern crate peroxide;
use peroxide::fuga::*;

fn main() {
    let a = c!(1,2,3,4,5);
    let b = c!(1.2, 1.8, 3.2, 3.8, 5.0);
    let ls = least_square(a, b);
    ls.print(); // 0.96x + 0.1200
}