This is a generalization of Problem 45851 for degree n
- - - -
You are given two vectors X and Y (coordinates of observations on a plane), and a degree d of the underlying model. Return a row vector P with the d+1 coefficients of the best-fit polynomial, in the L1-norm sense. I.e., find P of degree d that minimizes sum( abs( Y - polyval(P,X) ) ) .
(compare your results with polyfit on the test suite!)

Solution Stats

12 Solutions

3 Solvers

Last Solution submitted on May 30, 2026

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...

Problem Recent Solvers3

Suggested Problems

More from this Author10

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!