Newton's interpolation formula

Hello,
could someone help me with my exam? This is it: Using Newton's interpolation formula plot a graph of the polynomial interpolation maximum level at a specified interval you specify points, while the input data containing the coordinates. This is exam in Matlab, i can what this program have to do, but I can't programming it :( Please, is there someone who can help me? I sitting on this whole week but i can't solve it.

Comments

  • I have a source code for newton's interpolation formula, but I can't make a graph

    function fp = newton_interpolation(x,y,p)
    n = length(x);
    a(1) = y(1);
    for k = 1 : n - 1
    d(k, 1) = (y(k+1) - y(k))/(x(k+1) - x(k));
    end
    for j = 2 : n - 1
    for k = 1 : n - j
    d(k, j) = (d(k+1, j - 1) - d(k, j - 1))/(x(k+j) - x(k));
    end
    end
    d
    for j = 2 : n
    a(j) = d(1, j-1);
    end
    Df(1) = 1;
    c(1) = a(1);
    for j = 2 : n
    Df(j)=(p - x(j-1)) .* Df(j-1);
    c(j) = a(j) .* Df(j);
    end
    fp=sum(c);
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion