Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function mylagran = mylagr(x,y,xx)
- pomocnicza = 0.0;
- mylagran = 0.0;
- for i = 1:length(x)
- pomocnicza = 1.0;
- for j = 1:length(x)
- if(i~=j)
- pomocnicza = pomocnicza*((xx-x(j))./(x(i)-x(j)));
- end
- end
- mylagran = mylagran+(y(i)*pomocnicza);
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement