Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
zeros of legendre's polynomial
n = input(' '); E = zeros(n,1); %% Setup the eigenvalue problem and solve; A = zeros(n,n); for i=1:n-1 A(i,i+1) = i/(sqrt(4*i*i-1)); end for i=2:n A(i,i-1) = A(i-1,i); end %% save the eigenvalue in the one dimensional %% vector of size n named E E = eig(A); fprintf('The roots are\n') for j = 1:n fprintf('%.12g\n',E(j)); end
run
|
edit
|
history
|
help
0
edit1:polygon
felix 1
Delsq
Binomial coefficient
Krylov.m
Test
Runge's Phenomenon
1sttest.m
Krylov.mX
first.m