Skip to content

Commit

Permalink
funziona (spero)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukefleed committed Apr 12, 2021
1 parent 1ff8ec6 commit 5aeebc7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lezione-05/es3.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@ function es3(k)
P1 = [1];
P2 = [1 0];
t = linspace(-1,1,1000);
hold on
plot(t,polyval(P1,t))
hold on
plot(t,polyval(P2,t))
for i = 3:k
P3 = ((2*(i-1))*[P2 0] .- (i-1)*[0 0 P1])/i;
P1 = P2;
P2 = P3;
hold on
plot(t, polyval(P3,t))
end

Expand Down

0 comments on commit 5aeebc7

Please sign in to comment.