Matrice rare si matrice banda

density = nnz(A)/prod(size(A))
sparsity = 1 -density
% <latex>
% O \emph{matrice rar\u{a}} este o matrice a c\u{a}rei raritate este apropiat\u{a}
% de 1. \emph{L\u{a}\c{t}imea de band\u{a}} a unei matrice este distan\c{t}a
% maxim\{a} de la elementele nenule la diagonala principal\u{a}.
% </latex>
%
[i,j] = find(A);
bandwidth = max(abs(i-j))
%<latex>
% differentiable and in fact analytic on $[-1,1]$.  (Recall that this means
% that for any $s\in [-1,1]$, $f$ has a Taylor series about $s$ that
% converges to $f$ in a neighborhood of $s$.)  Then without any further
% assumptions we may conclude that the Chebyshev projections and
% interpolants converge {\bf geometrically}, that is, at the rate
% $O(C^{-n})$ for some constant $C>1$.  This means the errors will look
% like straight lines (or better) on a semilog scale rather than a loglog
% scale. This kind of connection was first announced by Bernstein in 1911,
% who showed that the best approximations to a function $f$ on $[-1,1]$
% converge geometrically as $n\to\infty$ if and only if $f$ is analytic
% [Bernstein 1911 \& 1912{\sc b}].
% </latex>