Skip to content

Instantly share code, notes, and snippets.

@bsima
Created November 26, 2014 01:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bsima/a7cba593a05bbe9321ad to your computer and use it in GitHub Desktop.
Save bsima/a7cba593a05bbe9321ad to your computer and use it in GitHub Desktop.
% Say you have a matrix and you want to quickly understand what the
% data distribution looks like.
% The following snippet will do the trick.
A = magic(5) % create a random matrix
imagesc(A), colorbar, colormap grey;
% This will create a greyscale image of the values of the matrix, with
% each number corresponding to a different value of grey. It will also
% give you a key to which you may refer.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment