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

Réponses (0)

Catégories

En savoir plus sur Interpolation dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by