Mercurial > matrix-functions
view toolbox/pei.m @ 8:a587712dcf5f draft default tip
funm_atom.m: rename fun_atom to funm_atom
* funm_atom.m: rename fun_atom to funm_atom.
author | Antonio Pino Robles <data.script93@gmail.com> |
---|---|
date | Fri, 29 May 2015 09:48:36 +0200 |
parents | 8f23314345f4 |
children |
line wrap: on
line source
function P = pei(n, alpha) %PEI Pei matrix. % PEI(N, ALPHA), where ALPHA is a scalar, is the symmetric matrix % ALPHA*EYE(N) + ONES(N). % If ALPHA is omitted then ALPHA = 1 is used. % The matrix is singular for ALPHA = 0, -N. % Reference: % M.L. Pei, A test matrix for inversion procedures, % Comm. ACM, 5 (1962), p. 508. if nargin == 1, alpha = 1; end P = alpha*eye(n) + ones(n);