Mercurial > matrix-functions
view toolbox/moler.m @ 7:e0817ccb2834 draft
Add square root matrix function file, rename atom at funm_files, modify old toolbox to run it inside GNU Octave.
added funm_files/fun_atom.m
added sqrtm2.m
added toolbox/gecp.m
toolbox/see.m: comment wrong call to subplot
toolbox/tmtdemo.m: add a cast to double, as eig does not admit bool matrix input
removed funm_files/funm_atom.m
author | Antonio Pino Robles <data.script93@gmail.com> |
---|---|
date | Tue, 26 May 2015 18:14:54 +0200 |
parents | 8f23314345f4 |
children |
line wrap: on
line source
function A = moler(n, alpha) %MOLER Moler matrix - symmetric positive definite. % A = MOLER(N, ALPHA) is the symmetric positive definite N-by-N matrix % U'*U where U = TRIW(N, ALPHA). % For ALPHA = -1 (the default) A(i,j) = MIN(i,j)-2, A(i,i) = i. % A has one small eigenvalue. % Nash (1990) attributes the ALPHA = -1 matrix to Moler. % % Reference: % J.C. Nash, Compact Numerical Methods for Computers: Linear % Algebra and Function Minimisation, second edition, Adam Hilger, % Bristol, 1990 (Appendix 1). if nargin == 1, alpha = -1; end A = triw(n, alpha)'*triw(n, alpha);