View License

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

» Watch video

Highlights from
polyVal2D and polyFit2D

5.0 | 1 rating Rate this file 38 Downloads (last 30 days) File Size: 11.5 KB File ID: #41097 Version: 1.1
image thumbnail

polyVal2D and polyFit2D


Mark Mikofski (view profile)


03 Apr 2013 (Updated )

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

| Watch this File

File Information

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:

They are also hosted in a Gist on Github here:


2 D Weighted Polynomial Fitting And Evaluation and Polyfitn inspired this file.

Required Products MATLAB
MATLAB release MATLAB 8.0 (R2012b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (2)
20 Mar 2016 Rayane Karim

'Degree must be smaller than number of data poiints.')

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

Comment only
17 Oct 2013 Zoe

Zoe (view profile)

Much better than the personal one I wrote.

18 Apr 2013 1.1

now with polyDer2D.m

Contact us