poster
2023-06-29, 05:01
MATLAB has dozens of test matrices. Here are a few.
Contents
MiniGallery (https://www.labfans.com/bbs/#2fb5167b-7e82-4227-9f86-2870405cf53c)
Collections (https://www.labfans.com/bbs/#eba25d52-863f-4050-9d5c-28d66c4a102b)
Blogs (https://www.labfans.com/bbs/#66c32842-91ed-4ddf-9f2b-544fc3a88564)
Software (https://www.labfans.com/bbs/#a58fbf40-276b-4c6c-8576-97e02358a317)
http://blogs.mathworks.com/cleve/files/TinyGallery.png
MiniGallery
Random. A = sprand(n,n,0.25). Random sparse, density = 0.25.
Bucky. A = bucky. Sparse connectivity graph of the geodesic dome, the soccer ball, and the carbon-60 molecule.
Wilkinson. A = wilkinson(n). Wn+. Nearly equal double eigenvalues.
Band. A = triu(tril(A,2),-2). Elements near diagonal.
Triangular. A = triu(A). Elements on and above diagonal.
Hessenberg. A = triu(A,-1). Upper triangular plus one subdiagonal. See schur.
Permutation. A = sparse(randperm(n),1:n,1). One +1 in each row and column.
Companion. c = charpoly(A); A = [-c(2:end); eye(n-1,n)]. Traditional companion matrix.
Fiedler. c = charpoly(A); A = fiedler(-c(2:end)). Fiedler companion matrix.
Hankel. A = flip(gallery('toeppd',n)). Constant antidiagonals.
Toeplitz. A = gallery('toeppd',n). Constant diagonals.
Magic. A = magic(n). Magic square.
Collections
gallery. Nick Higham and MathWorks, https://www.mathworks.com/help/matlab/ref/gallery.html
Anymatrix. Nick Higham and Mantas Mikaitis, https://nhigham.com/2021/11/09/anymatrix>
SuiteSparse. Tim Davis, Yifan Hu and Scott Kolodzie, http://sparse.tamu.edu
MatrixMarket, NIST, https://math.nist.gov/MatrixMarket.
Blogs
https://blogs.mathworks.com/cleve/2012/11/05/magic-squares-part-2-algorithms/
https://blogs.mathworks.com/cleve/2013/04/15/wilkinsons-matrices-2/.
https://blogs.mathworks.com/cleve/2013/12/23/fiedler-companion-matrix/.
https://blogs.mathworks.com/cleve/2021/05/12/bringing-back-the-bucky-ball/.
Software
https://blogs.mathworks.com/cleve/files/MiniGallery.m
Get the MATLAB code (requires JavaScript) (javascript:grabCode_3ac745ceafba4a469aec48ad4b98c1b4())
Published with MATLAB® R2023a
More... (https://blogs.mathworks.com/cleve/2023/06/28/minigallery-sampler-of-matlab-test-matrices/?s_tid=feedtopost)
Contents
MiniGallery (https://www.labfans.com/bbs/#2fb5167b-7e82-4227-9f86-2870405cf53c)
Collections (https://www.labfans.com/bbs/#eba25d52-863f-4050-9d5c-28d66c4a102b)
Blogs (https://www.labfans.com/bbs/#66c32842-91ed-4ddf-9f2b-544fc3a88564)
Software (https://www.labfans.com/bbs/#a58fbf40-276b-4c6c-8576-97e02358a317)
http://blogs.mathworks.com/cleve/files/TinyGallery.png
MiniGallery
Random. A = sprand(n,n,0.25). Random sparse, density = 0.25.
Bucky. A = bucky. Sparse connectivity graph of the geodesic dome, the soccer ball, and the carbon-60 molecule.
Wilkinson. A = wilkinson(n). Wn+. Nearly equal double eigenvalues.
Band. A = triu(tril(A,2),-2). Elements near diagonal.
Triangular. A = triu(A). Elements on and above diagonal.
Hessenberg. A = triu(A,-1). Upper triangular plus one subdiagonal. See schur.
Permutation. A = sparse(randperm(n),1:n,1). One +1 in each row and column.
Companion. c = charpoly(A); A = [-c(2:end); eye(n-1,n)]. Traditional companion matrix.
Fiedler. c = charpoly(A); A = fiedler(-c(2:end)). Fiedler companion matrix.
Hankel. A = flip(gallery('toeppd',n)). Constant antidiagonals.
Toeplitz. A = gallery('toeppd',n). Constant diagonals.
Magic. A = magic(n). Magic square.
Collections
gallery. Nick Higham and MathWorks, https://www.mathworks.com/help/matlab/ref/gallery.html
Anymatrix. Nick Higham and Mantas Mikaitis, https://nhigham.com/2021/11/09/anymatrix>
SuiteSparse. Tim Davis, Yifan Hu and Scott Kolodzie, http://sparse.tamu.edu
MatrixMarket, NIST, https://math.nist.gov/MatrixMarket.
Blogs
https://blogs.mathworks.com/cleve/2012/11/05/magic-squares-part-2-algorithms/
https://blogs.mathworks.com/cleve/2013/04/15/wilkinsons-matrices-2/.
https://blogs.mathworks.com/cleve/2013/12/23/fiedler-companion-matrix/.
https://blogs.mathworks.com/cleve/2021/05/12/bringing-back-the-bucky-ball/.
Software
https://blogs.mathworks.com/cleve/files/MiniGallery.m
Get the MATLAB code (requires JavaScript) (javascript:grabCode_3ac745ceafba4a469aec48ad4b98c1b4())
Published with MATLAB® R2023a
More... (https://blogs.mathworks.com/cleve/2023/06/28/minigallery-sampler-of-matlab-test-matrices/?s_tid=feedtopost)