Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function koeffizienten = Lagrange(Nullstellen_vec)
- NSt=-1*Nullstellen_vec;
- out=0*[0:1:length(NSt)]
- out(1)=1;
- for i=1:length(NSt)
- outc=out;
- for j=2:length(out)-1
- out(j)=outc(j-1)+outc(j)*NSt(i);
- endfor
- out(1)=outc(1)*NSt(i);
- out(i+1)=1;
- endfor
- koeffizienten=out;
- endfunction
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement