File Exchange

image thumbnail

polyVal2D and polyFit2D

version 1.1 (11.5 KB) by

Evaluate 2D polynomials using Horner's method. Fit 2D polynomials to data using backslash operator.

22 Downloads

Updated

View License

Often it's necessary to fit or evaluate a function with 2 dimensions. Use polyFit2D.m to fit a 2D polynomila to data and polyVal2D.m to evaluate it. Fun!

These functions are explained in detail here:
http://poquitopicante.blogspot.com/2013/03/horners-method-in-2d.html

They are also hosted in a Gist on Github here:
https://gist.github.com/mikofski/5159267

Comments and Ratings (2)

Rayane Karim

assert(all((n+1)*(m+1)<=Npoints)......
'Degree must be smaller than number of data poiints.')

work also fine when Degree must be smaller "or equal" than number of data

Zoe

Zoe (view profile)

Much better than the personal one I wrote.

Updates

1.1

now with polyDer2D.m

MATLAB Release
MATLAB 8.0 (R2012b)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video