正在加载图片...
function H=hilb(n) %HILB Hilbert matrix This is also a good example of efficient MaTlaB programming %o style where conventional for or do loops are replaced b %o vectorized statements. This approach is faster, but uses more storage % C Moler. 6-22-91 %o Copyright 1984-2001 The Math Works, Inc % PRevision:59$ SDate:2001/04/1512:02:29 J=l n; J=J(ones(n, D) :I=J E=ones(n, n H=E/(I+J-1)function H = hilb(n) %HILB Hilbert matrix. % This is also a good example of efficient MATLAB programming % style where conventional FOR or DO loops are replaced by % vectorized statements. This approach is faster, but uses % more storage. % C. Moler, 6-22-91. % Copyright 1984-2001 The MathWorks, Inc. % $Revision: 5.9 $ $Date: 2001/04/15 12:02:29 $ J = 1:n; J = J(ones(n,1),:); I = J'; E = ones(n,n); H = E./(I+J-1);
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有