newton interpolation image matrix

I worked on the Newton Interpolation. The Function is: yi = NtnInter(x,y,xi) My question is: How do I enter the x, y, xi values from my Image Matrix ?
% function newton interpolation code
function y = newtonInterpolation(X,Y,x) % interpolate values y at points x using data vectors X and Y n = length(X); % build coefficient table D = diag(Y); for m = 1:n for i = 1:n-m j = i+m; D(i,j) = (D(i+1,j)-D(i,j-1))/(X(j)-X(i)); end end % return final value y = Y(1)*ones(size(x)); for k = 2:n s = D(1,k); for i = 1:k-1 s = s.*(x-X(i)*ones(size(x))); end y = y+s; end end

回答(0 个)

类别

帮助中心File Exchange 中查找有关 Interpolation 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by