comparison toolbox/prolate.m @ 0:8f23314345f4 draft

Create local repository for matrix toolboxes. Step #0 done.
author Antonio Pino Robles <data.script93@gmail.com>
date Wed, 06 May 2015 14:56:53 +0200
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:8f23314345f4
1 function A = prolate(n, w)
2 %PROLATE Prolate matrix - symmetric, ill-conditioned Toeplitz matrix.
3 % A = PROLATE(N, W) is the N-by-N prolate matrix with parameter W.
4 % It is a symmetric Toeplitz matrix.
5 % If 0 < W < 0.5 then
6 % - A is positive definite
7 % - the eigenvalues of A are distinct, lie in (0, 1), and
8 % tend to cluster around 0 and 1.
9 % W defaults to 0.25.
10
11 % Reference:
12 % J.M. Varah. The Prolate matrix. Linear Algebra and Appl.,
13 % 187:269--278, 1993.
14
15 if nargin == 1, w = 0.25; end
16
17 a = zeros(n,1);
18 a(1) = 2*w;
19 a(2:n) = sin( 2*pi*w*(1:n-1) ) ./ ( pi*(1:n-1) );
20
21 A = toeplitz(a);