summaryrefslogtreecommitdiff
path: root/50/DEPENDENCIES/legrangeinterpol.sci
blob: cbaff9113dc8f8cac000d95c6faf7a279d8a2958 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
function P1=legrangeinterpol (x0,x1,f0,f1)
    x=poly(0,"x");
    L0=(x-x1)/(x0-x1);
    L1=(x-x0)/(x1-x0);
    P1=L0*f0+L1*f1;
endfunction