Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

To resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit: http://www.mathworks.com/matlabcentral/answers/159016

Fitting a polynomial through a given point (without lsqlin)

Asked by David Wilson on 26 Jul 2012

Has anyone written a routine to fit a polynomial constrained to run through a single arbitrary point (x0,y0) without using lsqlin from the optimisation toolbox as mentioned in http://www.mathworks.com/support/solutions/en/data/1-12BBUC/?

It is easy to "hack" the vandermonde matrix to get the polynomial to go through the origin, but it is messy to get it to go through an arbitray point. Defining new variables t = x-x0 and z = y-y0 and then fitting in the transformed variables is OK, but to recover the coefficients in x requires the pascal matrix and is very messy (but still linear). Before I do this, has anyone already attempted it?

0 Comments

David Wilson

Products

No products are associated with this question.

0 Answers

Contact us