Yossiri
Yossiri

Reputation: 35

Method behinds "interp2" command

I always use interp2 to interpolate my data in MATLAB. But I want to know what kind of algorithm is really used when running that command, such as Local Weight Regression (LWR) or something.

Upvotes: 0

Views: 734

Answers (1)

Sam Roberts
Sam Roberts

Reputation: 24127

If you type doc interp2, you'll see that you can specify one of four different methods that interp2 can use: nearest neighbour interpolation, linear interpolation, cubic spline interpolation, or cubic interpolation.

If you don't specify one of those explicitly, it will use the default method, which is linear interpolation.

Upvotes: 2

Related Questions