Problem: Given a 2 dimensional matrix, say \(m\times n\,\), how to visualize its content?
These are some examples showing how to visualize a matrix as a 3D data, where the height is taken as the values of the matrix entries, and the \(x,y\,\ \)indices as the coordinates.
Mathematica
mat = Table[Table[RandomReal[{0,100}], {20}],{10}]; ListPointPlot3D[mat,Filling->Axis ,ImageSize->300]
mat = HilbertMatrix[{20,10}]; ListPlot3D[mat,Mesh->None,InterpolationOrder->0, ColorFunction->"SouthwestColors", Filling->Axis,ImageSize->300]
Matlab
clear all; close all; A = (100).*rand(20,20); [X,Y] = meshgrid(1:20,1:20); surfl(X,Y,A); shading interp colormap(gray);
figure; A = hilb(20); [X,Y] = meshgrid(1:20,1:20); surfl(X,Y,A);
Maple
restart; A := abs(LinearAlgebra[RandomMatrix](20,10,generator=0..100)): plots[matrixplot](A,heights=histogram);
A := LinearAlgebra[HilbertMatrix](20,10): A := convert(A,listlist): plots[listplot3d](A);