git-svn-id: http://moon:8086/svn/matlab/trunk@157 801c6759-fa7c-4059-a304-17956f83a07c
This commit is contained in:
2022-06-16 06:16:47 +00:00
parent 9c60c50492
commit 579c1544b1
29 changed files with 1210 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
function lgip(order)
Nlg = order + 1;
Npts = 11;
t = Nlg/2 + ((0:Npts-1)/(Npts-1)-0.5)
xk = [0 0.5 0];
for k=1:Npts,
y(k) = 0;
for i=0:Nlg-1,
hlg = 1;
for j=0:Nlg-1,
if (i ~= j)
hlg = hlg * (t(k) - j)/((i)-(j));
end;
end;
y(k) = y(k) + xk(i+1) * hlg;
end;
end;
plot(y); grid;