% Generate and plot n = 100; B = randn(n); figure; imagesc(B); colorbar; title('Random Xnxn Matrix Heatmap');
This plot displays a blue dot for every non-zero entry, allowing you to see the structure and density of your data. xnxn matrix matlab plot pdf download
When n > 500, PDFs can become bloated. Use rasterization: % Generate and plot n = 100; B